/* /css/style.css */

/* --- Universal Box Sizing --- */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
/* ---------------------------------- */

:root {
  --color-bg-dark: #120c1c;
  --color-bg-medium: #1f1433;
  --color-bg-light: #2e1f4a;
  --color-primary: #a855f7;
  --color-text-light: #f0e8ff;
  --color-text-secondary: #a99ecb;
  --color-success: #22c55e;
  --color-pending: #f59e0b;
  --color-error: #ef4444;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  margin: 0;
  padding: 0;
  background-image: none; 
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrap {
  flex: 1;
  padding: 20px;
}

/* --- Header Styles --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background-color: var(--color-bg-medium);
  border-bottom: 1px solid var(--color-bg-light);
}
.header-logo a {
  color: var(--color-text-light);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}
.header-logo a i {
  color: var(--color-primary);
  margin-right: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li {
  margin-left: 25px;
}
.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-light);
}
.nav-links a i {
  margin-right: 8px;
}
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--color-text-light);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

/* --- Main Content Containers --- */
.auth-container,
.main-container,
.dashboard-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background-color: var(--color-bg-medium);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
}

.dashboard-container {
  max-width: 1000px;
}

h1, h2 {
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 25px;
  margin-top: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 30px; 
}
.form-group label {
  display: block;
  margin-top: 0; 
  margin-bottom: 8px;
  color: var(--color-text-secondary);
  font-weight: 500;
  height: auto; 
  overflow: visible;
  padding: 0;
}
.form-group label i {
  margin-right: 8px;
  width: 20px;
  text-align: center;
}
.form-control {
  width: 100%;
  padding: 12px;
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-text-secondary); 
  border-radius: 8px;
  color: var(--color-text-light);
}
.form-control:focus { outline: none; border-color: var(--color-primary); }
.tooltip-text-content + .form-control {
    margin-top: 15px; 
}
.tooltip-text-content .form-control {
    margin-top: 15px;
    margin-left: 0;
    margin-right: 0;
}
textarea.form-control { min-height: 100px; resize: vertical; }

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  background-color: var(--color-primary);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s;
}
.btn:hover { background-color: #9333ea; }
.btn i { margin-right: 10px; }
.auth-link { display: block; text-align: center; margin-top: 20px; color: var(--color-text-secondary); }
.auth-link a { color: var(--color-primary); text-decoration: none; }

/* --- Dashboard Grid --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.video-card {
  background-color: var(--color-bg-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.video-card-thumbnail {
  width: 100%;
  height: 150px;
  background-color: var(--color-bg-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: var(--color-text-secondary);
  position: relative; 
}

.video-card-thumbnail img { 
  width: 100%; 
  height: 100%; 
  object-fit: fill; 
}
.video-card-info { padding: 15px; }
.video-card-info h3 {
  margin: 0 0 10px 0;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-card-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}
.status-pending { background-color: var(--color-pending); color: var(--color-bg-dark); }
.status-complete { background-color: var(--color-success); color: var(--color-bg-dark); }
.status-failed { background-color: var(--color-error); color: var(--color-bg-dark); }

.video-card-actions { margin-top: 15px; }
.btn-download { background-color: var(--color-success); }
.btn-download:hover { background-color: #16a34a; }
.btn-pending { background-color: var(--color-pending); cursor: not-allowed; }
.btn-failed { background-color: var(--color-error); cursor: not-allowed; }

/* --- Pending Thumbnail Styles --- */
.pending-thumb-single {
  width: 100%;
  height: 100%;
  object-fit: fill; 
}
.pending-thumb-split {
  display: flex;
  width: 100%;
  height: 100%;
}
.pending-thumb-split img {
  width: 50%;
  height: 100%;
  object-fit: fill; 
  border-right: 1px solid var(--color-bg-medium);
}
.pending-thumb-split img:last-child {
  border-right: none;
}

/* --- Footer Styles --- */
.main-footer {
  padding: 25px;
  background-color: var(--color-bg-dark);
  border-top: 1px solid var(--color-bg-light);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}
.main-footer p {
  margin: 5px 0;
}
.main-footer a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
}
.main-footer a:hover {
  color: var(--color-primary);
}

/* --- Tooltip Styles --- */
.tooltip-container { display: none; }
.tooltip-text-content {
  visibility: visible;
  opacity: 1;
  position: static; 
  transform: none;
  display: block; 
  width: 100%; 
  max-width: 100%;
  background-color: transparent; 
  color: var(--color-text-secondary);
  text-align: left;
  font-weight: 400; 
  padding: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin-top: 5px; 
  margin-bottom: 0;
  margin-left: 0; 
  font-size: 0.9em;
}
.tooltip-title-text {
    color: var(--color-text-light);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 5px 0; 
    padding: 0;
    display: block; 
}
.tooltip-text-content::after { display: none; }
.tooltip-desc-text { display: block; line-height: 1.4; }
.tooltip-desc-text::before {
    font-family: 'Font Awesome 6 Free';
    content: '\f05a'; 
    font-weight: 900;
    color: var(--color-primary);
    margin-right: 8px;
    position: static; 
    top: auto; 
    left: auto;
    border: none;
    margin-left: 0;
}

/* --- Video Card Styles --- */
.video-card-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: fill; 
}
.play-button-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  z-index: 2; 
}
.play-button-overlay:hover {
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.1);
}
.review-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
}
.review-video-player {
  display: none; 
  width: 100%;
  height: 100%;
  z-index: 3; 
}

/* --- FAQ Styles --- */
.faq-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}
.faq-item {
    background-color: var(--color-bg-light);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden; 
}
.faq-item h2 {
    text-align: left;
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin: 0; 
}
.faq-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px;
    background-color: var(--color-bg-medium);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
}
.faq-toggle:hover { background-color: var(--color-bg-light); }
.faq-toggle i { color: var(--color-primary); transition: transform 0.3s ease; }
.faq-toggle.active i { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 20px;
}
.faq-answer.open {
    max-height: 500px; 
    padding: 20px; 
    padding-top: 0; 
}
.faq-answer p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  .content-wrap { padding: 10px; }
  .main-header { padding: 15px; }
  .menu-toggle { display: block; }
  .nav-links { display: none; }
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 12, 28, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
  }
  .main-nav.is-active {
    opacity: 1;
    visibility: visible;
  }
  .main-nav.is-active .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* --- MOBILE MENU TEXT SIZE FIX --- */
  .main-nav.is-active .nav-links li {
    margin: 15px 0; /* Space them out vertically */
    margin-left: 0; /* Remove desktop left-margin */
  }
  .main-nav.is-active .nav-links a,
  .main-nav.is-active .nav-links span {
    font-size: 1.8rem; /* Make text significantly larger */
    font-weight: 600;
  }
  /* -------------------------------- */

  .auth-container,
  .main-container,
  .dashboard-container {
    width: 100%;
    padding: 20px;
    margin: 20px auto;
  }
  .video-grid { gap: 10px; }

  /* Mobile Form Styling - UPDATED */
  .form-group label {
      display: block; 
      height: auto;       /* FIXED: Changed from 0 */
      overflow: visible;  /* FIXED: Changed from hidden */
      margin-bottom: 8px; /* FIXED: Added spacing */
      padding: 0;
  }
  /* End Mobile Form Styling Update */

  .tooltip-container { display: none; }
  .tooltip-text-content {
    visibility: visible !important; 
    opacity: 1 !important; 
    position: static !important; 
    transform: none !important;
    display: block;
    width: 100%; 
    padding: 10px 15px 10px 15px; 
    background-color: var(--color-bg-light); 
    border-radius: 8px;
    border-left: 5px solid var(--color-primary); 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
    margin-top: 5px; 
    margin-bottom: 10px;
    font-weight: 400; 
    color: var(--color-text-secondary);
    line-height: 1.4;
    font-size: 0.95em; 
  }
  .tooltip-title-text {
      color: var(--color-text-light);
      font-weight: 700;
      font-size: 1.1rem;
      margin: 0 0 5px 0; 
      padding: 0;
      display: block; 
  }
  .tooltip-desc-text::before {
      font-family: 'Font Awesome 6 Free';
      content: '\f05a'; 
      font-weight: 900;
      color: var(--color-primary);
      margin-right: 8px;
      position: static; 
      top: auto; 
      left: auto;
      border: none;
      margin-left: 0;
  }
  .tooltip-text-content::after { display: none; }
}

/* --- Account Page / Danger Zone Styles --- */
.danger-zone {
    border: 1px solid var(--color-error);
    background-color: rgba(239, 68, 68, 0.1);
}
.danger-zone h2, .danger-zone p {
    color: var(--color-error);
}
.btn-delete {
    background-color: transparent;
    border: 1px solid var(--color-error);
    color: var(--color-error);
    transition: all 0.3s ease;
}
.btn-delete:hover {
    background-color: var(--color-error);
    color: white;
}
/* Confirmation States */
.btn-delete[data-step="1"] {
    background-color: var(--color-pending);
    border-color: var(--color-pending);
    color: #000;
}
.btn-delete[data-step="2"] {
    background-color: var(--color-error);
    color: #fff;
    font-weight: 900;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.section-divider {
    margin: 40px 0;
    border-bottom: 1px solid var(--color-bg-light);
}