/* KeyRaag Academy - Premium Piano & Music Education Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #0b1120;
  --bg-card: #151f32;
  --bg-card-hover: #1e2d4a;
  --bg-elevated: #1e293b;
  --primary-gold: #f59e0b;
  --primary-gold-hover: #d97706;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.3);
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.05);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary-gold);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #fbbf24;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Glassmorphic Top Navbar */
.navbar-app {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-gold), #b45309);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px var(--gold-glow);
}

.brand-logo span strong {
  color: var(--primary-gold);
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
}

.nav-search {
  position: relative;
  width: 240px;
}

.nav-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.45rem 1rem 0.45rem 2.4rem;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.nav-search input:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 10px var(--gold-glow);
  background: rgba(255, 255, 255, 0.08);
}

.nav-search i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn-kr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-kr-primary {
  background: linear-gradient(135deg, var(--primary-gold), #d97706);
  color: #0b1120;
  box-shadow: 0 4px 20px var(--gold-glow);
}

.btn-kr-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  color: #0b1120;
}

.btn-kr-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-color: var(--border-color);
}

.btn-kr-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-kr-outline {
  background: transparent;
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}

.btn-kr-outline:hover {
  background: var(--primary-gold);
  color: #0b1120;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 4.5rem 0 3rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(11, 17, 32, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  color: var(--primary-gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.2rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-title span {
  background: linear-gradient(135deg, #ffffff 40%, var(--primary-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.stat-item h4 {
  font-size: 1.6rem;
  color: var(--primary-gold);
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Interactive Virtual Piano Widget */
.piano-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-premium);
  position: relative;
}

.piano-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.piano-widget-header h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.piano-keyboard-container {
  position: relative;
  user-select: none;
}

.piano-keyboard {
  display: flex;
  position: relative;
  height: 150px;
  background: #000;
  border-radius: var(--radius-md);
  padding: 5px 5px 0 5px;
  overflow: hidden;
  box-shadow: inset 0 5px 15px rgba(0,0,0,0.8);
}

.key-white {
  flex: 1;
  background: linear-gradient(to bottom, #ffffff 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background 0.1s, transform 0.05s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.key-white.active, .key-white:active {
  background: linear-gradient(to bottom, #f59e0b 0%, #d97706 100%);
  color: #0b1120;
  transform: translateY(2px);
}

.key-black {
  position: absolute;
  top: 5px;
  width: 6.5%;
  height: 95px;
  background: linear-gradient(to bottom, #1e293b 0%, #000000 100%);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 2px 3px 6px rgba(0,0,0,0.6);
  transition: background 0.1s;
}

.key-black.active, .key-black:active {
  background: var(--primary-gold);
}

/* Position Black Keys over 25-key setup */
.key-black[data-note="C#4"] { left: 10.5%; }
.key-black[data-note="D#4"] { left: 24.5%; }
.key-black[data-note="F#4"] { left: 53.0%; }
.key-black[data-note="G#4"] { left: 67.0%; }
.key-black[data-note="A#4"] { left: 81.0%; }

.piano-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section Styling */
.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem;
}

.section-subtitle {
  color: var(--primary-gold);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Course Cards Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-premium);
}

.course-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-thumb img {
  transform: scale(1.05);
}

.badge-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;

}

.badge-bestseller {
  background: #ef4444;
  color: #ffffff;
}

.badge-featured {
  background: var(--primary-gold);
  color: #0b1120;
}

.badge-free {
  background: var(--accent-emerald);
  color: #ffffff;
}

.wishlist-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(11, 17, 32, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.wishlist-btn:hover, .wishlist-btn.active {
  color: #ef4444;
  background: rgba(11, 17, 32, 0.9);
}

.course-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-category {
  color: var(--primary-gold);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.course-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.course-title a {
  color: #ffffff;
}

.course-title a:hover {
  color: var(--primary-gold);
}

.course-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.course-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-box {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.price-free {
  color: var(--accent-emerald);
}

.price-sale {
  color: #ffffff;
}

.price-original {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.3rem;
}

/* Category Cards */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  display: block;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.category-icon {
  width: 60px;
  height: 60px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 50%;
  color: var(--primary-gold);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background: var(--primary-gold);
  color: #0b1120;
}

.category-title {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.category-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Star Rating */
.star-rating {
  color: var(--primary-gold);
  font-size: 0.85rem;
}

.star-rating .far {
  color: #475569;
}

.rating-num {
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* Classroom / Lesson View */
.classroom-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: calc(100vh - 70px);
}

.media-player-area {
  background: #050811;
  padding: 2rem;
  overflow-y: auto;
}

.player-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow-premium);
  margin-bottom: 1.5rem;
}

.player-wrapper iframe, .player-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sheet-viewer-container {
  background: #1e293b;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.sheet-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.curriculum-sidebar {
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
}

.module-header {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  font-weight: 600;

}

.lesson-item-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.lesson-item-link:hover, .lesson-item-link.active {
  background: rgba(245, 158, 11, 0.1);
  color: #ffffff;
}

.lesson-item-link.active {
  border-left: 3px solid var(--primary-gold);
}

/* Practice Room */
.practice-room-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.timer-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--primary-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  box-shadow: 0 0 30px var(--gold-glow);
}

.timer-time {
  font-size: 2.2rem;
  font-family: var(--font-heading);
  font-weight: 700;
}

/* Footer */
.footer-app {
  background: #050811;
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin: 1rem 0 1.5rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.65rem;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 55px;
  height: 55px;
  background: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: #ffffff;
}

/* Mobile Drawer & Responsiveness */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 992px) {
  .hero-grid, .classroom-container, .practice-room-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-links, .nav-search {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.4rem;
  }
}
