/**
 * 200GB Shorts WebApp - Styling
 * Cyberpunk Dark Neon & Glassmorphism Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #0a0b14;
  --bg-card: rgba(18, 20, 36, 0.75);
  --bg-card-hover: rgba(28, 32, 58, 0.85);
  --bg-input: rgba(255, 255, 255, 0.06);
  
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-active: rgba(0, 242, 254, 0.5);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-pink: #ff007f;
  --accent-purple: #9d4edd;
  --accent-gold: #ffd700;
  --accent-green: #10b981;
  
  --glow-cyan: 0 0 20px rgba(0, 242, 254, 0.4);
  --glow-pink: 0 0 20px rgba(255, 0, 127, 0.4);
  --glow-purple: 0 0 25px rgba(157, 78, 221, 0.35);

  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(157, 78, 221, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(0, 242, 254, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 0, 127, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: calc(40px + var(--safe-bottom));
}

/* ========================================================
   HEADER
   ======================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: calc(var(--safe-top) + 14px) 16px 14px 16px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.header-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #0a0b14;
  box-shadow: var(--glow-cyan);
}

.header-title-box h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #fff 30%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.2;
}

.header-title-box p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

.disk-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: #00f2fe;
}

/* Tabs */
.app-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(79, 172, 254, 0.25));
  color: #fff;
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 2px 12px rgba(0, 242, 254, 0.2);
}

/* ========================================================
   MAIN CONTENT & CARDS
   ======================================================== */
.app-main {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.card-title i {
  color: #00f2fe;
  font-size: 16px;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.req {
  color: var(--accent-pink);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0 16px 0 42px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.form-control.no-icon {
  padding-left: 14px;
}

.form-control:focus {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.05);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.form-control:focus ~ .input-icon {
  color: #00f2fe;
}

/* Dropzone */
.video-dropzone {
  border: 2px dashed rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.04);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.video-dropzone:hover,
.video-dropzone.dragover {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.1);
  box-shadow: var(--glow-cyan);
}

.dropzone-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 10px;
}

.dropzone-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* Video Preview Card */
.video-preview-card {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.video-preview-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #0a0b14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.video-preview-info {
  flex: 1;
  min-width: 0;
}

.video-preview-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.video-preview-size {
  font-size: 11px;
  color: #00f2fe;
}

.btn-remove-video {
  background: rgba(255, 0, 127, 0.15);
  border: 1px solid rgba(255, 0, 127, 0.3);
  color: #ff007f;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-video:hover {
  background: rgba(255, 0, 127, 0.3);
}

/* Anime Search Results */
.anime-search-results {
  max-height: 220px;
  overflow-y: auto;
  background: rgba(14, 16, 30, 0.95);
  border: 1px solid var(--glass-border-active);
  border-radius: var(--radius-md);
  margin-top: 6px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  z-index: 50;
  position: relative;
}

.anime-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
}

.anime-search-item:last-child {
  border-bottom: none;
}

.anime-search-item:hover {
  background: rgba(0, 242, 254, 0.12);
}

.anime-item-poster {
  width: 36px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.anime-item-info {
  flex: 1;
  min-width: 0;
}

.anime-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.anime-item-meta {
  font-size: 11px;
  color: var(--text-dim);
}

/* Selected Anime Card */
.selected-anime-card {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.35);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.selected-anime-poster {
  width: 42px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.selected-anime-info {
  flex: 1;
  min-width: 0;
}

.selected-anime-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.selected-anime-meta {
  font-size: 11px;
  color: #00f2fe;
}

.btn-change-anime {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Progress Dashboard */
.progress-dashboard {
  display: none;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 14px;
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.progress-percent {
  font-size: 14px;
  font-weight: 800;
  color: #00f2fe;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe, #4facfe);
  border-radius: 10px;
  transition: width 0.2s linear;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.progress-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

.progress-metric-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.progress-metric-item i {
  color: #00f2fe;
}

/* Submit Button */
.btn-submit-main {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  border: none;
  border-radius: var(--radius-md);
  color: #0a0b14;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
  transition: all 0.25s ease;
  margin-top: 10px;
}

.btn-submit-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.6);
}

.btn-submit-main:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Shorts List Card */
.shorts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 500px) {
  .shorts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.short-item-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.short-item-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  background: var(--bg-card-hover);
}

.short-item-video-box {
  width: 100%;
  height: 180px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.short-item-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.short-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.short-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.short-views-badge {
  font-size: 11px;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-delete-short {
  background: rgba(255, 0, 127, 0.12);
  border: 1px solid rgba(255, 0, 127, 0.25);
  color: #ff007f;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-delete-short:hover {
  background: rgba(255, 0, 127, 0.25);
}

/* Toast */
.toast-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(255, 0, 127, 0.95);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 5px 25px rgba(255, 0, 127, 0.5);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
