﻿/* ===== CSS Variables ===== */
:root {
  --color-bg: #f0f2f5;

  --color-surface: #ffffff;
  --color-surface-hover: #f8f9fa;

  --color-border: #d1d5db;
  --color-border-hover: #9ca3af;

  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-tertiary: #9ca3af;

  --color-primary: #2c3e50;
  --color-primary-hover: #1a252f;
  --color-primary-light: rgba(44, 62, 80, 0.1);
  --color-primary-rgb: 44, 62, 80;

  --color-success: #16a34a;
  --color-success-light: rgba(22, 163, 74, 0.1);
  --color-error: #dc2626;
  --color-error-light: rgba(220, 38, 38, 0.1);
  --color-warning: #d97706;
  --color-warning-light: rgba(217, 119, 6, 0.1);
  --color-info: #2563eb;
  --color-info-light: rgba(37, 99, 235, 0.1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark Theme */
  --color-bg: #0a0a0a;
  --color-surface: #121212;
  --color-surface-hover: #1a1a1a;
  --color-border: #2a2a2a;
  --color-border-hover: #3a3a3a;

  --color-text-primary: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-text-tertiary: #6a6a6a;

  --color-primary: #ffffff;
  --color-primary-hover: #e0e0e0;
  --color-primary-light: rgba(255, 255, 255, 0.1);
  --color-primary-rgb: 255, 255, 255;

  --color-success: #2ecc71;
  --color-success-light: rgba(46, 204, 113, 0.15);
  --color-error: #e74c3c;
  --color-error-light: rgba(231, 76, 60, 0.15);
  --color-warning: #f39c12;
  --color-warning-light: rgba(243, 156, 18, 0.15);
  --color-info: #3498db;
  --color-info-light: rgba(52, 152, 219, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
}

/* ===== Loading Screen ===== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      var(--color-bg) 0%,
      var(--color-surface) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  width: 70px;
  height: 70px;
  position: relative;
  margin-bottom: 24px;
}

.loader-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: loaderRotate 1.5s linear infinite;
}

.loader-circle:nth-child(1) {
  border-top-color: var(--color-primary);
  animation-delay: 0s;
}

.loader-circle:nth-child(2) {
  border-right-color: var(--color-primary);
  animation-delay: 0.5s;
}

.loader-circle:nth-child(3) {
  border-bottom-color: var(--color-primary);
  animation-delay: 1s;
}

.loader-logo {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary) 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.loader-text {
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  animation: pulse 2s infinite;
}

/* ===== Animations ===== */
@keyframes loaderRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 5px var(--color-primary);
  }

  50% {
    box-shadow: 0 0 20px var(--color-primary);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }

  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }

  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes shimmerEffect {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  transition: background-color var(--transition-base),
    color var(--transition-base);
  overflow-x: hidden;
}

/* ===== Particles Background ===== */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: all;
  /* Allow interaction with particles */
}

/* ===== App Structure ===== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.content-wrapper {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 0;
  position: relative;
  z-index: 1;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 1000;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.5s ease-out;
}

.theme-toggle:hover {
  background: var(--color-surface-hover);
  transform: scale(1.05) rotate(15deg);
  box-shadow: var(--shadow-lg);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle i {
  font-size: 18px;
  transition: opacity var(--transition-fast);
}

[data-theme="light"] .theme-toggle .dark-icon,
[data-theme="dark"] .theme-toggle .light-icon {
  display: none;
}

/* ===== Message Box ===== */
.message-box {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-base);
  animation: slideInUp 0.3s ease-out;
  backdrop-filter: blur(10px);
}

.message-box.success {
  background: var(--color-success-light);
  border-color: var(--color-success);
  color: var(--color-success);
}

.message-box.error {
  background: var(--color-error-light);
  border-color: var(--color-error);
  color: var(--color-error);
}

.message-box.info {
  background: var(--color-info-light);
  border-color: var(--color-info);
  color: var(--color-info);
}

/* ===== View Sections ===== */
.view-section {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-section.hidden {
  display: none;
}

/* ===== Auth View ===== */
.auth-container {
  max-width: 440px;
  margin: 60px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  text-align: center;
  margin-bottom: 48px;
  width: 100%;
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #667eea 100%);
  color: var(--color-bg);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  animation: float 3s ease-in-out infinite;
}

.brand-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-primary) 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-subtitle {
  font-size: 16px;
  color: var(--color-text-secondary);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.auth-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  width: 100%;
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
  box-shadow: var(--shadow-xl);
  border: none;
  backdrop-filter: blur(10px);
  background: rgba(var(--color-surface-rgb), 0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text-secondary);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 8px;
  transition: color var(--transition-fast);
}

.password-toggle:hover {
  color: var(--color-text-secondary);
}

/* Password Strength Indicator */
.password-strength {
  font-size: 12px;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  font-weight: 500;
}

.password-strength.weak {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.password-strength.medium {
  color: #f39c12;
  background: rgba(243, 156, 18, 0.1);
}

.password-strength.strong {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

/* Password Requirements */
.password-requirements {
  margin-top: 8px;
  padding: 12px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.requirement-item:last-child {
  margin-bottom: 0;
}

.requirement-icon {
  width: 16px;
  height: 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.requirement-item.met .requirement-icon {
  background: var(--color-success);
  color: white;
}

.requirement-item.met span {
  color: var(--color-success);
}

.requirement-item:not(.met) .requirement-icon {
  background: var(--color-error);
  color: white;
}

/* Password Match Indicator */
.password-match {
  font-size: 12px;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  font-weight: 500;
}

.password-match.mismatch {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.password-match.match {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

/* Remember Me Checkbox */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.remember-me input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.remember-me label {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.form-note {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.form-note a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.form-note a:hover {
  text-decoration: underline;
  color: var(--color-primary-hover);
}

.form-link {
  text-align: center;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 20px;
}

.form-link a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.form-link a:hover {
  text-decoration: underline;
  color: var(--color-primary-hover);
}

.divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
  width: 100%;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--color-border);
  transition: all var(--transition-base);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.divider span {
  display: inline-block;
  padding: 0 12px;
  background: var(--color-bg);
  color: var(--color-text-tertiary);
  font-size: 13px;
  font-weight: 500;
}

/* ===== Buttons ===== */

/* Custom error display for flex items-start */
.flex.items-start {
  display: flex;
  align-items: center;
  color: var(--color-error);
  margin-bottom: 1rem;
}

/* Center the Sign In button */
.auth-form button.btn-primary {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  animation: fadeIn 0.3s ease-out;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #667eea 100%);
  color: white;
  border: none;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg,
      var(--color-primary-hover) 0%,
      #5a67d8 100%);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--color-text-primary);
  background: var(--color-surface);
  border-color: var(--color-border);
}

.btn-error {
  background: linear-gradient(135deg, var(--color-error) 0%, #c53030 100%);
  color: white;
  border: none;
}

.btn-error:hover:not(:disabled) {
  background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
}

.btn-success {
  background: linear-gradient(135deg, var(--color-success) 0%, #10b981 100%);
  color: white;
  border: none;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  width: 100%;
}

.btn-back {
  padding: 8px 16px;
  margin-bottom: 24px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px;
  transition: all var(--transition-fast);
}

.btn-text:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* ===== Spinner ===== */
.spinner {
  width: 20px;
  height: 20px;
  margin-left: 10px;
  animation: rotate 2s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

.spinner-circle {
  stroke: currentColor;
  stroke-width: 3px;
  /* Slightly thinner for elegance */
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  fill: none;
  animation: dash 1.5s ease-in-out infinite;
}

/* Rotates the whole SVG container */
@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* Expands and contracts the stroke to create the 'snake' effect */
@keyframes dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 89, 200;
    stroke-dashoffset: -35px;
  }

  100% {
    stroke-dasharray: 89, 200;
    stroke-dashoffset: -124px;
  }
}

/* ===== Header ===== */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Aligns content to left */
  padding: 20px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
  gap: 16px;
  /* increased gap */
  animation: slideInUp 0.4s ease-out;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-greeting {
  font-size: 15px;
  font-weight: 500;
}

/* ===== Announcement ===== */
.announcement {
  padding: 16px 20px;
  background: var(--color-info-light);
  border: 1px solid var(--color-info);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  color: var(--color-text-primary);
  animation: slideInUp 0.5s ease-out;
  backdrop-filter: blur(10px);
}

/* ===== Content Section ===== */
.content-section {
  margin-bottom: 32px;
}

.section-header {
  margin-bottom: 32px;
  animation: fadeIn 0.6s ease-out;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.section-description {
  font-size: 16px;
  color: var(--color-text-secondary);
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  animation: fadeIn 0.4s ease-out;
}

/* ===== Upload Zone ===== */
.upload-zone {
  display: block;
  padding: 48px 32px;
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg,
      rgba(var(--color-primary-rgb), 0.05) 0%,
      transparent 100%);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 24px;
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg,
      rgba(var(--color-primary-rgb), 0.1) 0%,
      transparent 100%);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.upload-zone.drag-over {
  animation: glow 1.5s infinite;
  border-color: var(--color-primary);
  background: linear-gradient(135deg,
      rgba(var(--color-primary-rgb), 0.15) 0%,
      transparent 100%);
}

.upload-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  animation: shimmerEffect 2s infinite;
}

.upload-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.upload-content i {
  font-size: 48px;
  color: var(--color-primary);
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.upload-zone:hover .upload-content i {
  transform: scale(1.1);
}

.upload-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.upload-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.file-input {
  display: none;
}

/* ===== Multi Preview ===== */
.multi-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeIn 0.4s ease-out;
}

.multi-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.preview-media {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.preview-media img,
.preview-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.multi-preview-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.multi-preview-item img,
.multi-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.multi-preview-item:hover img,
.multi-preview-item:hover video {
  transform: scale(1.1);
}

.multi-preview-remove {
  all: unset;
  position: absolute;
  top: 2px;
  right: 2px;

  width: 24px;
  height: 24px;
  border-radius: 50%;

  background: #e74c3c;
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;

  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);

  /* 👇 hide by default */
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.multi-preview-item:hover .multi-preview-remove {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ===== Upload Queue ===== */
.upload-queue {
  margin-bottom: 24px;
  animation: slideInUp 0.4s ease-out;
}

.queue-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.queue-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  animation: slideInRight 0.3s ease-out;
  transition: all 0.3s ease;
}

.upload-item:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
}

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

.upload-filename {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-progress-container {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #667eea);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.upload-status {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.upload-cancel {
  background: none;
  border: none;
  color: var(--color-error);
  cursor: pointer;
  padding: 8px;
  transition: all var(--transition-fast);
}

.upload-cancel:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.queue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeIn 0.3s ease-out;
}

.queue-stats {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ===== Dashboard ===== */
.dashboard-section {
  margin-top: 48px;
  animation: fadeIn 0.6s ease-out;
}

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideInUp 0.4s ease-out;
  backdrop-filter: blur(10px);
}

.alert i {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-warning {
  background: var(--color-warning-light);
  border-color: var(--color-warning);
  color: var(--color-text-primary);
}

.alert-error {
  background: var(--color-error-light);
  border-color: var(--color-error);
  color: var(--color-text-primary);
  animation: pulse 2s infinite;
}

.alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
}

.alert-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.alert-countdown {
  font-size: 14px;
  font-weight: 500;
}

/* ===== Media Gallery ===== */
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-image {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--color-surface);
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-image:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary);
}

.gallery-image.expiring {
  border-color: var(--color-error);
  border-width: 3px;
  animation: pulse 2s infinite;
}

.gallery-image img,
.gallery-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-image:hover img,
.gallery-image:hover video {
  transform: scale(1.1);
}

.gallery-image>div {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 16px;
}

.gallery-image:hover>div {
  opacity: 1;
}

.gallery-image>div span {
  color: white;
  font-size: 14px;
  font-weight: 600;
  background: var(--color-primary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  width: 100%;
  transform: translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-image:hover>div span {
  transform: translateY(0);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-border);
  animation: pulse 2s infinite;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
  animation: float 3s ease-in-out infinite;
}

.empty-state p {
  font-size: 16px;
  font-weight: 500;
}

/* ===== Video Player ===== */
.video-player {
  position: relative;
  width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
  animation: fadeIn 0.5s ease-out;
}

.video-player video {
  width: 100%;
  height: auto;
  max-height: 500px;
  display: block;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.video-player:hover .video-controls {
  opacity: 1;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  transition: all 0.2s ease;
}

.control-btn:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #667eea);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 2px;
}

.time-display {
  color: white;
  font-size: 12px;
  font-family: "Courier New", monospace;
  min-width: 80px;
  text-align: center;
}

.volume-slider {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.volume-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: white;
  width: 100%;
  border-radius: 2px;
}

/* Fullscreen Video */
.video-player:fullscreen {
  border-radius: 0;
}

.video-player:fullscreen video {
  max-height: 100vh;
  height: 100%;
  object-fit: contain;
}

.video-player:fullscreen .video-controls {
  padding: 24px;
}

.video-player.fullscreen-active {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
}

.video-player.fullscreen-active video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-player.fullscreen-active .video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* ===== Image Preview ===== */
.image-preview {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 8px;
  margin-bottom: 24px;
  animation: fadeIn 0.5s ease-out;
  box-shadow: var(--shadow-md);
}

/* ===== Button Group ===== */
.button-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeIn 0.4s ease-out;
}

/* ===== Social Share ===== */
.social-share {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  animation: fadeIn 0.5s ease-out;
}

.social-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  transform: translateY(0);
}

.social-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: var(--shadow-lg);
}

.social-twitter {
  background: linear-gradient(135deg, #1da1f2 0%, #1a91da 100%);
}

.social-facebook {
  background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
}

.social-instagram {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
}

/* ===== Settings Card ===== */
.settings-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  animation: slideInUp 0.4s ease-out;
  transition: all 0.3s ease;
}

.settings-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.card-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.danger-zone {
  border-color: var(--color-error);
  background: var(--color-error-light);
}

.danger-zone:hover {
  border-color: var(--color-error);
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
}

.select-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.select-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* ===== Sessions List ===== */
.sessions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  animation: slideInRight 0.3s ease-out;
  transition: all 0.3s ease;
}

.session-item:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
}

.session-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-info i {
  font-size: 24px;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.session-item:hover .session-info i {
  transform: scale(1.1);
}

.session-details p {
  font-size: 14px;
  font-weight: 500;
}

.session-details small {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.session-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-secondary);
  animation: pulse 2s infinite;
}

.delete-session-btn {
  background: none;
  border: none;
  color: var(--color-error);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
  text-decoration: underline;
}

.delete-session-btn:hover {
  background: var(--color-error-light);
  text-decoration: none;
  transform: translateY(-1px);
}

.delete-session-btn:active {
  transform: translateY(0);
}

.current-session-badge {
  background: var(--color-success-light);
  color: var(--color-success);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.session-ip {
  font-family: monospace;
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* ===== Statistics Page Styles ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.stats-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  animation: slideInUp 0.4s ease-out;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-hover);
}

.stats-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--color-primary);
}

/* ===== Statistics Page Styles ===== */

/* Allow full screen width for stats page */
.content-wrapper-full {
  max-width: 100% !important;
  width: 100%;
  padding: 32px;
}

.stats-grid {
  display: grid;
  /* Columns will fill space, min 400px wide */
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
  width: 100%;
}

.stats-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  animation: slideInUp 0.4s ease-out;
  display: flex;
  flex-direction: column;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-hover);
}

/* Make specific cards take full width */
.stats-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--color-primary);
}

/* --- STATS LAYOUT --- */
.content-wrapper-full {
  min-height: 100vh;
  padding: 40px !important;
  max-width: 1400px;
  margin: 0 auto;
}

.stats-navigation {
  margin-bottom: 30px;
}

.stats-navigation a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  opacity: 0.8;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stats-navigation a:hover {
  opacity: 1;
  text-decoration: underline;
}

.stats-navigation h1 {
  font-size: 32px;
  font-weight: 800;
  margin-top: 15px;
  color: var(--color-text-primary);
  letter-spacing: -0.5px;
}

/* Metrics Row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  background: var(--color-surface);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-card .label {
  color: var(--color-text-secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.metric-card .value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0;
  color: var(--color-text-primary);
}

/* Progress bar */
.mini-progress {
  height: 4px;
  background: var(--color-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.mini-progress .fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.mini-progress .fill.danger {
  background: #ef4444;
}

/* Main Area */
.main-stats-area {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

@media (max-width: 1024px) {
  .main-stats-area {
    grid-template-columns: 1fr;
  }
}

.chart-main-card {
  background: var(--color-surface);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--color-border);
}

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

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.chart-legend-custom {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  margin-left: 15px;
}

.dot.uploads {
  background-color: #6366f1;
}

.dot.views {
  background-color: #10b981;
}

.canvas-wrapper {
  height: 400px;
  width: 100%;
  position: relative;
}

.canvas-wrapper-small {
  height: 200px;
  width: 100%;
  position: relative;
  margin-top: 20px;
}

.stats-card {
  background: var(--color-surface);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
}

.stats-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Lists */
.stat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-top: 4px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.stat-item:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
}

.stat-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.stat-info i {
  color: var(--color-text-secondary);
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.stat-name-link {
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1;
}

.stat-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.stat-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 12px;
}

.stat-empty {
  text-align: center;
  color: var(--color-text-secondary);
  font-style: italic;
  padding: 20px;
}

/* Activity List */
.activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

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

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-info-light);
  color: var(--color-info);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.activity-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.activity-date {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.activity-size {
  font-size: 13px;
  font-family: monospace;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.activity-icon.delete-type {
    background: rgba(239, 68, 68, 0.1); /* Light red background */
    color: #ef4444; /* Red icon */
}

/* Storage bar colors */
.storage-text-left {
  color: var(--color-text-primary);
  font-weight: 600;
}

.storage-text-right {
  color: var(--color-text-secondary);
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .content-wrapper-full {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Storage Usage Widget */
.storage-section {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.storage-section h3 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.storage-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.storage-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.storage-progress-bg {
  width: 100%;
  height: 10px;
  background-color: var(--color-border);
  /* Grey background for empty part */
  border-radius: 5px;
  overflow: hidden;
}

.storage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #3b82f6);
  /* Theme gradient */
  border-radius: 5px;
  transition: width 0.5s ease-in-out;
}

/* Color change if storage is nearly full (>90%) */
.storage-progress-fill.danger {
  background: var(--color-error);
}

.storage-subtitle {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

/* ===== Footer ===== */
.app-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 24px 20px;
  margin-top: auto;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.6s ease-out;
}

.footer-status {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  color: inherit;
}

.status-indicator:hover {
  background: var(--color-surface-hover);
  transform: translateY(-2px);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
  transition: all 0.3s ease;
}

.status-dot.up {
  background: var(--color-success);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.status-dot.down {
  background: var(--color-error);
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
  animation: pulse 2s infinite;
}

.status-indicator:hover .status-dot {
  transform: scale(1.2);
}

.status-indicator span {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.footer-links a:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-links .separator {
  color: var(--color-text-tertiary);
}

/* ===== Status Badges ===== */
.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.status-up {
  background-color: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-up:hover {
  background-color: rgba(34, 197, 94, 0.25);
}

.status-down {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulse 2s infinite;
}

.status-down:hover {
  background-color: rgba(239, 68, 68, 0.25);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

.modal.hidden {
  display: none;
  animation: fadeOut 0.3s ease-out;
}

.modal.show {
  display: flex !important;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--color-surface);
  padding: 24px;
  border-radius: 16px;
  width: 40%;
  max-width: 400px;
  /* Limits width so it's not huge */
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-actions {
  display: flex;
  justify-content: flex-start;
  /* Aligns Copy/Close buttons to left */
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  /* Prevents squishing */
  min-height: 32px;
  /* Prevents squishing */
  border-radius: 50%;
  border: none;
  background: var(--color-surface);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  /* Adds slight depth */
}

.modal-close:hover {
  background: var(--color-surface-hover);
  transform: rotate(90deg);
}

.modal-body {
  text-align: left;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.status-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.status-item:hover {
  background: var(--color-surface-hover);
  transform: translateX(5px);
}

.status-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-item-info i {
  font-size: 20px;
  color: var(--color-text-tertiary);
}

.status-message {
  padding: 16px;
  background: var(--color-warning-light);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  animation: slideInUp 0.3s ease-out;
}

.status-footer {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* ===== Terms of Service Iframe ===== */
.tos-iframe {
  width: 100%;
  height: 400px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tos-iframe::-webkit-scrollbar {
  width: 8px;
}

.tos-iframe::-webkit-scrollbar-track {
  background: var(--color-surface);
  border-radius: 4px;
}

.tos-iframe::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 4px;
  border: 2px solid var(--color-surface);
  transition: background-color var(--transition-fast);
}

.tos-iframe::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-primary-hover);
}

/* ===== Checkbox ===== */
.checkbox-wrapper {
  margin-bottom: 20px;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  color: var(--color-text-secondary);
}

.checkbox-label>span:last-child {
  height: 1em;
  line-height: 1;
  align-items: center;
}

.checkbox-custom {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-right: 10px;
  vertical-align: middle;
}

.checkbox-label:hover .checkbox-custom {
  border-color: var(--color-primary);
}

.checkbox-custom::after {
  content: "";
  position: absolute;
  display: none;
  left: 4.4px;
  top: -0.5px;
  width: 7px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: all var(--transition-fast);
}

.checkbox-input:checked+.checkbox-label .checkbox-custom {
  background-color: var(--color-success);
  border-color: var(--color-success);
}

.checkbox-input:checked+.checkbox-label .checkbox-custom::after {
  display: block;
}

.form-group.remember-me {
  margin-bottom: 20px;
}

/* ===== Utility Classes ===== */
.hidden {
  display: none !important;
}

/* ===== Hover Effects ===== */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-glow {
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 24px 16px 0;
  }

  .theme-toggle {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  .auth-container {
    margin: 40px auto;
  }

  .auth-form {
    padding: 24px;
  }

  .brand-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

  .brand-title {
    font-size: 36px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: flex-end;
  }

  .btn span {
    display: none;
  }

  .btn {
    padding: 10px 16px;
  }

  .media-gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .upload-zone {
    padding: 32px 20px;
  }

  .section-header h2,
  .section-title {
    font-size: 24px;
  }

  .modal-content {
    max-width: calc(100% - 32px);
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    padding: 20px 12px 0;
  }

  .app-footer {
    padding: 20px 12px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 8px;
  }

  .media-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .button-group {
    grid-template-columns: 1fr;
  }

  .settings-card {
    padding: 20px;
  }

  .loader {
    width: 60px;
    height: 60px;
  }

  .loader-logo {
    font-size: 24px;
  }

  .brand-title {
    font-size: 32px;
  }
}

/* ===== Print Styles ===== */
@media print {

  .theme-toggle,
  #loading-screen,
  .announcement,
  .upload-zone,
  .btn,
  .video-controls,
  .social-share,
  .app-footer {
    display: none !important;
  }

  .app-container {
    margin: 0;
    padding: 0;
  }

  .content-wrapper {
    max-width: none;
    padding: 0;
  }

  .view-section {
    display: block !important;
    opacity: 1 !important;
  }
}

/* ===== Enhanced Message Box System ===== */
.message-box {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 0;
  border: 2px solid;
  font-size: 14px;
  font-weight: 500;
  max-width: 500px;
  width: calc(100% - 48px);
  z-index: 10000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  animation: slideInDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: white !important;
}

.message-box * {
  color: white !important;
}

.message-box.hidden {
  animation: slideOutUp 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Message Box Types */
.message-box.success {
  background: linear-gradient(135deg,
      rgba(39, 174, 96, 0.95) 0%,
      rgba(46, 204, 113, 0.95) 100%);
  border-color: #27ae60;
  box-shadow: 0 10px 40px rgba(39, 174, 96, 0.4);
}

.message-box.error {
  background: linear-gradient(135deg,
      rgba(231, 76, 60, 0.95) 0%,
      rgba(192, 57, 43, 0.95) 100%);
  border-color: #c0392b;
  box-shadow: 0 10px 40px rgba(231, 76, 60, 0.4);
  animation: slideInDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), shake 0.5s 0.4s;
}

.message-box.info {
  background: linear-gradient(135deg,
      rgba(52, 152, 219, 0.95) 0%,
      rgba(41, 128, 185, 0.95) 100%);
  border-color: #2980b9;
  box-shadow: 0 10px 40px rgba(52, 152, 219, 0.4);
}

.message-box.warning {
  background: linear-gradient(135deg,
      rgba(243, 156, 18, 0.95) 0%,
      rgba(230, 126, 34, 0.95) 100%);
  border-color: #e67e22;
  box-shadow: 0 10px 40px rgba(243, 156, 18, 0.4);
}

/* Message Box Content */
.message-box .flex {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.message-box i {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: white !important;
  animation: iconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.message-box .flex-1 {
  flex: 1;
  line-height: 1.5;
  color: white !important;
  animation: textSlideIn 0.5s ease-out 0.3s both;
}

.message-box button {
  background: none;
  border: none;
  color: white !important;
  cursor: pointer;
  padding: 4px;
  margin: -4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  flex-shrink: 0;
  opacity: 0.8;
}

.message-box button i {
  color: white !important;
}

.message-box button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.message-box button:active {
  transform: scale(0.95);
}

/* Additional Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes slideOutUp {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-50%) translateY(0) translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(-50%) translateY(0) translateX(5px);
  }
}

@keyframes iconPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes textSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Progress bar for auto-hide */
.message-box::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transform-origin: left;
  animation: progressBar 5s linear;
}

@keyframes progressBar {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

/* Copy Success Animation */
.copy-success {
  animation: copyPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes copyPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Confirmation Dialog Styles */
div[class*="fixed"][class*="inset-0"][class*="bg-black/50"][class*="flex"][class*="items-center"][class*="justify-center"] {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

div[class*="bg-gradient-to-br"][class*="from-gray-900"][class*="to-black"][class*="border"][class*="border-gray-800"][class*="rounded-xl"][class*="p-6"][class*="max-w-md"][class*="w-full"] {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-border);
}

button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-gray-800"][class*="hover:bg-gray-700"][class*="transition-colors"][class*="cancel-btn"],
button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-blue-600"][class*="hover:bg-blue-700"][class*="transition-colors"][class*="confirm-btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-gray-800"][class*="hover:bg-gray-700"][class*="transition-colors"][class*="cancel-btn"]:hover:not(:disabled),
button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-blue-600"][class*="hover:bg-blue-700"][class*="transition-colors"][class*="confirm-btn"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-gray-800"][class*="hover:bg-gray-700"][class*="transition-colors"][class*="cancel-btn"]:active:not(:disabled),
button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-blue-600"][class*="hover:bg-blue-700"][class*="transition-colors"][class*="confirm-btn"]:active:not(:disabled) {
  transform: translateY(0);
}

button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-gray-800"][class*="hover:bg-gray-700"][class*="transition-colors"][class*="cancel-btn"] {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-gray-800"][class*="hover:bg-gray-700"][class*="transition-colors"][class*="cancel-btn"]:hover:not(:disabled) {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
}

button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-blue-600"][class*="hover:bg-blue-700"][class*="transition-colors"][class*="confirm-btn"] {
  background: linear-gradient(135deg, var(--color-primary) 0%, #667eea 100%);
  color: white;
  border: none;
}

button[class*="px-4"][class*="py-2"][class*="rounded-lg"][class*="bg-blue-600"][class*="hover:bg-blue-700"][class*="transition-colors"][class*="confirm-btn"]:hover:not(:disabled) {
  background: linear-gradient(135deg,
      var(--color-primary-hover) 0%,
      #5a67d8 100%);
}

div[class*="w-10"][class*="h-10"][class*="rounded-full"][class*="bg-blue-900/30"][class*="flex"][class*="items-center"][class*="justify-center"][class*="mr-3"] {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

div[class*="flex"][class*="items-center"][class*="mb-4"] h3,
div[class*="flex"][class*="items-center"][class*="justify-center"][class*="mb-4"] h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
  width: 100%;
}

p[class*="text-gray-300"][class*="mb-6"] {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
  text-align: center;
}

div[class*="flex"][class*="justify-end"][class*="space-x-3"] {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 24px 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .message-box {
    top: 16px;
    width: calc(100% - 32px);
    padding: 14px 16px;
    font-size: 13px;
  }

  .message-box i {
    font-size: 18px;
  }

  .confirmation-footer {
    flex-direction: column;
  }

  .confirmation-footer .confirmation-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .message-box {
    top: 12px;
    width: calc(100% - 24px);
    padding: 12px 14px;
  }

  .confirmation-content {
    padding: 16px;
  }

  .confirmation-header {
    padding: 16px;
  }

  .confirmation-body {
    padding: 16px;
  }

  .confirmation-footer {
    padding: 0 16px 16px;
  }
}

/* ===== Confirmation Dialog Styles ===== */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

.confirm-content {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 100%;
  animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.confirm-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--color-border);
}

.confirm-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.confirm-body {
  padding: 24px;
}

.confirm-message {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.confirm-footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

.confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.confirm-btn:active {
  transform: translateY(0);
}

.confirm-btn.cancel {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.confirm-btn.cancel:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
}

.confirm-btn.confirm {
  background: linear-gradient(135deg, var(--color-primary) 0%, #667eea 100%);
  color: white;
  border: none;
}

.confirm-btn.confirm:hover {
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, #5a67d8 100%);
}

.confirm-btn.danger {
  background: linear-gradient(135deg, var(--color-error) 0%, #c53030 100%);
  color: white;
  border: none;
}

.confirm-btn.danger:hover {
  background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
}

/* ===== Discord Formatting Styles ===== */
.discord-bold {
  font-weight: bold;
}

.discord-italic {
  font-style: italic;
}

.discord-underline {
  text-decoration: underline;
}

.discord-strikethrough {
  text-decoration: line-through;
}

.discord-header-1 {
  font-size: 2em;
  font-weight: bold;
  margin: 0.67em 0;
  color: var(--color-text-primary);
}

.discord-header-2 {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0.83em 0;
  color: var(--color-text-primary);
}

.discord-header-3 {
  font-size: 1.17em;
  font-weight: bold;
  margin: 1em 0;
  color: var(--color-text-primary);
}

.discord-subtext {
  font-size: 0.75em;
  color: var(--color-text-secondary);
  margin: 0.5em 0;
}

.discord-blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 16px;
  margin: 8px 0;
  color: var(--color-text-secondary);
}

.discord-blockquote.multiline {
  white-space: pre-wrap;
}

.discord-list {
  padding-left: 20px;
  margin: 8px 0;
}

.discord-list-item {
  margin: 4px 0;
  list-style-type: disc;
}

.discord-link {
  color: var(--color-primary);
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.discord-link:hover {
  opacity: 0.8;
}

.discord-timestamp {
  color: var(--color-text-secondary);
  font-style: italic;
  cursor: help;
  border-bottom: 1px dotted var(--color-text-secondary);
  transition: color 0.2s ease;
}

.discord-timestamp:hover {
  color: var(--color-text-primary);
}

/* ===== Delete Account Animation ===== */
.delete-animation-content {
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.delete-animation-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.delete-animation-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.delete-icon-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-error-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  animation: pulse 2s infinite;
}

.delete-icon {
  font-size: 40px;
  color: var(--color-error);
}

.delete-message {
  font-size: 16px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.delete-progress-container {
  width: 100%;
  margin-bottom: 24px;
  position: relative;
}

.delete-progress-bar {
  height: 13px;
  background: var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 9px;
}

.delete-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-error), #c53030);
  width: 0%;
  transition: width 0.5s ease-in-out;
  border-radius: 6px;
  position: relative;
}

.delete-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  animation: progressShine 2s infinite;
}

.delete-progress-text {
  position: absolute;
  top: -2.5px;
  right: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.delete-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.delete-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: all 0.3s ease;
}

.delete-step.active {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.delete-step.completed {
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.delete-step i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.delete-step.active i {
  color: var(--color-error);
  animation: pulse 1s infinite;
}

.delete-step.completed i {
  color: var(--color-success);
}

.delete-step span {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.delete-step.active span {
  color: var(--color-text-primary);
  font-weight: 500;
}

.delete-step.completed span {
  color: var(--color-success);
  text-decoration: line-through;
}

@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ===== Mobile Optimizations ===== */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Smooth Form Animations ===== */
.auth-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: none;
  backdrop-filter: blur(10px);
  background: rgba(var(--color-surface-rgb), 0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0) scale(1);
}

.auth-form.hidden {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  pointer-events: none;
  position: absolute;
}

.auth-form:not(.hidden) {
  animation: formSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes formSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Guest Button Styling ===== */
.guest-btn-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0;
}

.btn-auth {
  width: 100%;
  justify-content: center;
}

/* ===== Paste Button Container ===== */
.paste-btn-container {
  display: flex;
  justify-content: left;
  margin: 20px 0;
}

/* ===== Enhanced Mobile Header ===== */
.app-header {
  padding: 16px 0;
  flex-wrap: nowrap;
  gap: 12px;
}

.header-left {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-greeting {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  /* Optional: adds a nice border */
  border-radius: 12px;
  /* Makes it look like a pill/container */
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-right {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Align buttons to start (left) on new line */
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  /* Gap handled by parent */
}

/* Hide button text on mobile, show on desktop */
.btn-text-desktop {
  display: inline;
}

/* ===== Mobile Theme Toggle ===== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Mobile Touch Optimization ===== */
.btn,
.icon-btn,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}

/* ===== Improved Form Inputs for Mobile ===== */
.form-group input,
.form-group select,
.form-group textarea {
  font-size: 16px;
  /* Prevents zoom on iOS */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ===== Better Mobile Gallery ===== */
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* ===== Mobile Message Box ===== */
.message-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  width: 500px;
  z-index: 10001;
}

/* ===== Mobile Modal Improvements ===== */
.modal-content {
  max-height: calc(100vh - 40px);
  max-width: calc(100% - 40px);
  margin: 20px;
}

/* ===== Responsive Design Breakpoints ===== */

/* Tablets and below (768px) */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 20px 16px 0;
  }

  .theme-toggle {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  .auth-container {
    margin: 40px auto;
    padding: 0 8px;
  }

  .auth-form {
    padding: 24px 20px;
  }

  .brand-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
    margin-bottom: 16px;
  }

  .brand-title {
    font-size: 32px;
  }

  .brand-subtitle {
    font-size: 14px;
  }

  /* Hide button text on mobile */
  .btn-text-desktop {
    display: none;
  }

  .btn {
    padding: 10px 14px;
    font-size: 14px;
  }

  .btn i {
    font-size: 16px;
  }

  .app-header {
    padding: 12px 0;
    margin-bottom: 20px;
  }

  .media-gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .upload-zone {
    padding: 32px 20px;
  }

  .upload-content i {
    font-size: 40px;
  }

  .upload-title {
    font-size: 15px;
  }

  .upload-subtitle {
    font-size: 13px;
  }

  .section-header h2,
  .section-title {
    font-size: 24px;
  }

  .section-description {
    font-size: 14px;
  }

  .modal-content {
    max-width: calc(100% - 32px);
    margin: 16px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .announcement {
    padding: 14px 16px;
    font-size: 13px;
  }

  .alert {
    padding: 14px 16px;
    font-size: 13px;
  }

  .settings-card {
    padding: 20px;
  }

  .card-title {
    font-size: 16px;
  }

  .button-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .social-share {
    gap: 10px;
  }

  .social-btn {
    width: 44px;
    height: 44px;
  }

  .queue-title {
    font-size: 15px;
  }

  .session-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .session-info {
    width: 100%;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
  }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
  .content-wrapper {
    padding: 16px 12px 0;
  }

  .theme-toggle {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .theme-toggle i {
    font-size: 16px;
  }

  .brand-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .brand-title {
    font-size: 28px;
  }

  .brand-subtitle {
    font-size: 13px;
  }

  .auth-form {
    padding: 20px 16px;
  }

  .form-title {
    font-size: 20px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group select {
    padding: 10px 14px;
    font-size: 15px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .btn-large {
    padding: 14px 24px;
    font-size: 15px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .app-header {
    gap: 8px;
  }

  .header-right {
    gap: 6px;
  }

  .media-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .multi-preview {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
  }

  .upload-zone {
    padding: 28px 16px;
  }

  .upload-content i {
    font-size: 36px;
  }

  .upload-title {
    font-size: 14px;
  }

  .upload-subtitle {
    font-size: 12px;
  }

  .section-header h2,
  .section-title {
    font-size: 22px;
  }

  .message-box {
    top: 16px;
    max-width: calc(100% - 24px);
    padding: 12px 14px;
    font-size: 13px;
  }

  .message-box i {
    font-size: 16px;
  }

  .modal-content {
    max-width: calc(100% - 24px);
    margin: 12px;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-body {
    padding: 16px;
  }

  .confirm-content {
    max-width: calc(100% - 24px);
  }

  .settings-card {
    padding: 16px;
  }

  .video-player video {
    max-height: 300px;
  }

  .image-preview {
    max-height: 300px;
  }

  .footer-links {
    font-size: 11px;
  }

  .app-footer {
    padding: 16px 12px;
  }

  /* Smaller password requirements on mobile */
  .password-requirements {
    padding: 10px;
  }

  .requirement-item {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .requirement-icon {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }

  /* Delete animation adjustments */
  .delete-icon-container {
    width: 64px;
    height: 64px;
  }

  .delete-icon {
    font-size: 32px;
  }

  .delete-message {
    font-size: 14px;
  }

  .delete-step {
    padding: 10px;
  }

  .delete-step i {
    font-size: 16px;
  }

  .delete-step span {
    font-size: 13px;
  }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
  .brand-title {
    font-size: 24px;
  }

  .auth-form {
    padding: 16px 12px;
  }

  .form-title {
    font-size: 18px;
  }

  .btn-large {
    padding: 12px 20px;
    font-size: 14px;
  }

  .media-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .section-header h2,
  .section-title {
    font-size: 20px;
  }

  .upload-zone {
    padding: 24px 12px;
  }

  .message-box {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .auth-container {
    margin: 20px auto;
  }

  .brand {
    margin-bottom: 24px;
  }

  .brand-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
    margin-bottom: 12px;
  }

  .brand-title {
    font-size: 24px;
  }

  .auth-form {
    padding: 20px;
  }

  .modal-content {
    max-height: calc(100vh - 20px);
  }
}

/* Fix for iOS Safari bottom bar */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .modal-content {
    max-height: calc(100vh - 40px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
  }
}

/* ===== Performance Optimizations ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Additional Touch Improvements ===== */
.gallery-image,
.multi-preview-item,
.upload-zone,
.btn,
.icon-btn,
.social-btn,
.nav-item,
button {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection in inputs and text areas */
input,
textarea,
[contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ===== Improved Animation Performance ===== */
.auth-form,
.gallery-image,
.multi-preview-item,
.btn {
  will-change: transform, opacity;
}

/* Remove will-change after animation */
.auth-form:not(.hidden),
.gallery-image:hover,
.btn:hover {
  will-change: auto;
}

/* ===== Better Focus States for Accessibility ===== */
.btn:focus-visible,
.icon-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== Scroll Improvements ===== */
.modal-body,
.tos-iframe {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* ===== Better Upload Zone on Mobile ===== */
@media (max-width: 768px) {
  .upload-zone {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .upload-content {
    width: 100%;
  }
}

/* ===== Improved Status Indicator ===== */
.status-indicator {
  padding: 6px 10px;
  font-size: 12px;
}

.status-indicator span {
  font-size: 12px;
}

@media (max-width: 480px) {
  .status-indicator span {
    display: none;
  }

  .status-indicator {
    padding: 8px;
  }
}

/* ===== Better Password Toggle Button ===== */
.password-toggle {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

/* ===== Improved Checkbox for Mobile ===== */
.checkbox-custom {
  width: 22px;
  height: 22px;
  margin-right: 12px;
}

@media (max-width: 480px) {
  .checkbox-custom {
    width: 20px;
    height: 20px;
  }

  .checkbox-label {
    font-size: 14px;
  }
}

/* ===== Better Video Controls on Mobile ===== */
@media (max-width: 768px) {
  .video-controls {
    padding: 12px;
    gap: 8px;
  }

  .control-btn {
    padding: 6px;
    font-size: 14px;
  }

  .time-display {
    font-size: 11px;
    min-width: 70px;
  }

  .volume-slider {
    width: 50px;
  }
}

/* ===== Improved Queue Items on Mobile ===== */
@media (max-width: 480px) {
  .upload-item {
    padding: 10px;
    gap: 10px;
  }

  .upload-filename {
    font-size: 12px;
  }

  .upload-status {
    font-size: 11px;
  }

  .queue-stats {
    font-size: 12px;
  }
}

/* ===== Better Empty State on Mobile ===== */
@media (max-width: 480px) {
  .empty-state {
    padding: 40px 16px;
  }

  .empty-state i {
    font-size: 40px;
  }

  .empty-state p {
    font-size: 14px;
  }
}

/* ===== Loading Screen Mobile Optimization ===== */
@media (max-width: 480px) {
  .loader {
    width: 50px;
    height: 50px;
  }

  .loader-logo {
    font-size: 22px;
  }

  .loader-text {
    font-size: 13px;
  }
}