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

/* ==========================================================================
   DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
  --font-display: 'Outfit', 'Noto Sans KR', sans-serif;
  --font-body: 'Noto Sans KR', sans-serif;

  /* Aqua Premium Color Palette */
  --clr-bg: #030712;
  --clr-bg-card: rgba(17, 24, 39, 0.7);
  --clr-bg-card-hover: rgba(31, 41, 55, 0.8);
  --clr-border: rgba(255, 255, 255, 0.08);
  --clr-border-active: rgba(0, 242, 254, 0.4);

  --clr-primary: #00F2FE;      /* Neon Teal */
  --clr-secondary: #0072FF;    /* Electric Blue */
  --clr-accent: #3B82F6;       /* Soft Blue */
  --clr-text-main: #F3F4F6;    /* Off White */
  --clr-text-muted: #9CA3AF;   /* Cool Gray */
  --clr-success: #10B981;      /* Emerald Green */
  --clr-danger: #EF4444;       /* Ruby Red */

  --gradient-aqua: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-secondary) 100%);
  --gradient-dark: linear-gradient(180deg, #090D1A 0%, #030712 100%);
  --gradient-glow: radial-gradient(circle at 50% -20%, rgba(0, 242, 254, 0.15) 0%, transparent 70%);

  --shadow-neon: 0 0 20px rgba(0, 242, 254, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--clr-bg);
  background-image: var(--gradient-dark), var(--gradient-glow);
  background-attachment: fixed;
  color: var(--clr-text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--clr-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  border: 2px solid var(--clr-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* ==========================================================================
   LAYOUTS & COMPONENTS
   ========================================================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  padding: 24px 0;
  border-bottom: 1px solid var(--clr-border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.8);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--gradient-aqua);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--clr-primary);
  border-radius: 50%;
  box-shadow: var(--shadow-neon);
}

.badge {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--clr-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--clr-primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px var(--clr-primary); }
}

/* ==========================================================================
   HERO / MAIN CONTENT - GRID
   ========================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 64px 0;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}

@media (min-width: 768px) {
  .hero-text h1 {
    font-size: 56px;
  }
}

.text-gradient {
  background: var(--gradient-aqua);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 18px;
  color: var(--clr-text-muted);
  margin-bottom: 32px;
  max-width: 600px;
}

/* Glassmorphism Cards */
.card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: var(--clr-border-active);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-neon);
}

/* ==========================================================================
   PREMIUM VIDEO WIDGET (9:16 REELS/SHORTS MOCKUP)
   ========================================================================== */
.widget-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9 / 19;
  background: #000;
  border: 10px solid #1f2937;
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-neon);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Speaker & Camera notch */
.phone-notch {
  width: 140px;
  height: 24px;
  background: #1f2937;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-camera {
  width: 8px;
  height: 8px;
  background: #111827;
  border-radius: 50%;
}

/* Video Player Container */
.reels-player {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

.reels-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reels-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #050814;
}

/* Overlay Elements */
.reels-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 16px 20px 16px;
  z-index: 5;
  pointer-events: none;
}

.overlay-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.overlay-top .live-tag {
  background: var(--clr-danger);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.overlay-right-actions {
  position: absolute;
  right: 12px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  pointer-events: auto;
}

.action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: var(--gradient-aqua);
  transform: scale(1.1);
  box-shadow: var(--shadow-neon);
}

.action-label {
  font-size: 10px;
  color: #fff;
  margin-top: 4px;
  font-weight: 600;
}

.overlay-bottom-content {
  pointer-events: auto;
  max-width: 80%;
  color: #fff;
}

.reels-author {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reels-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--clr-primary);
  background: var(--clr-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  color: var(--clr-primary);
  font-family: var(--font-display);
}

.reels-desc {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
}

/* Captions / Subtitles Overlay */
.reels-subtitle-box {
  background: rgba(0, 0, 0, 0.75);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--clr-primary);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  min-height: 38px;
  display: flex;
  align-items: center;
  animation: slideUp 0.3s ease;
  backdrop-filter: blur(4px);
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Video Control buttons */
.play-pause-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.5);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 8;
}

.play-pause-overlay.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Custom Progress Bar */
.reels-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.2);
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 10;
  cursor: pointer;
}

.reels-progress-fill {
  height: 100%;
  background: var(--gradient-aqua);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: var(--shadow-neon);
}

/* ==========================================================================
   DASHBOARD SECTION: COMPARISON & LCC CALCULATOR
   ========================================================================== */
.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: -1px;
}

.section-subtitle {
  color: var(--clr-text-muted);
  text-align: center;
  margin-bottom: 48px;
  font-size: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 64px 0;
}

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

/* Interactive Table Stylings */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.comparison-table th {
  background: rgba(17, 24, 39, 0.9);
  padding: 16px;
  font-weight: 700;
  color: var(--clr-primary);
  border-bottom: 2px solid var(--clr-border);
}

.comparison-table td {
  padding: 16px;
  border-bottom: 1px solid var(--clr-border);
  background: rgba(17, 24, 39, 0.4);
}

.comparison-table tr:hover td {
  background: rgba(31, 41, 55, 0.6);
  color: #fff;
}

.comparison-table tr.highlighted td {
  background: rgba(0, 242, 254, 0.05);
  border-left: 3px solid var(--clr-primary);
  font-weight: 600;
}

.rank-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 12px;
}

.rank-1 { background: gold; color: #000; box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.rank-2 { background: silver; color: #000; }
.rank-3 { background: #cd7f32; color: #fff; }

/* Interactive LCC Calculator */
.calc-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text-muted);
}

.input-group input, .input-group select {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--clr-border);
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.calc-btn {
  width: 100%;
  background: var(--gradient-aqua);
  color: #000;
  font-weight: 800;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
  margin-bottom: 24px;
}

.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

.calc-results {
  background: rgba(0,0,0,0.4);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px dashed var(--clr-border-active);
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: center;
}

.result-item {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}

.result-val {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-display);
}

.result-val.savings {
  color: var(--clr-primary);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  border-top: 1px solid var(--clr-border);
  padding: 48px 0;
  text-align: center;
  color: var(--clr-text-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a:hover {
  color: var(--clr-primary);
}
