/* CSS Variables & Design Tokens */
:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --bg-input: #1e293b;
    --bg-terminal: #020617;
    
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-light: #34d399;
    --primary-glow: rgba(16, 185, 129, 0.2);
    
    --accent-sky: #38bdf8;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-amber: #f59e0b;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #022c22;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-focus: #10b981;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
}

/* Reset & Global Elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

button, input, select, textarea {
    font-family: inherit;
}

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

.container-narrow {
    max-width: 960px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-sky) 0%, var(--primary-light) 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Top Banner & Navigation Header */
.top-banner {
    background: linear-gradient(90deg, #059669 0%, #0d9488 50%, #0284c7 100%);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.banner-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.banner-link {
    text-decoration: underline;
    font-weight: 700;
    color: #ecfdf5;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    height: 75px;
    display: flex;
    align-items: center;
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon-box {
    width: 44px;
    height: 44px;
    background: #1e293b;
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    transition: var(--transition);
}

.brand-logo:hover .logo-icon-box {
    border-color: var(--primary);
    transform: scale(1.05);
}

.logo-text-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.logo-text-title span {
    color: var(--primary);
}

.logo-text-subtitle {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    display: block;
    margin-top: 0.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Custom Button Component Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-dark);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

.btn-outline:hover {
    border-color: #64748b;
    color: #ffffff;
    background: #334155;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-dropdown {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    background: #0f172a;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 40;
}

.mobile-dropdown.open {
    display: flex;
}

.hero-section {
    position: relative;
    padding: 4.5rem 0 3.5rem 0;
    overflow: hidden;
}

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

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

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1.25rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .hero-title { font-size: 3.25rem; }
}

.hero-description {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 1.75rem;
    max-width: 600px;
    line-height: 1.6;
}

/* Search Form & Controls */
.search-box-wrap {
    position: relative;
    max-width: 540px;
}

.search-input {
    width: 100%;
    padding: 0.9rem 7.5rem 0.9rem 2.75rem;
    border-radius: var(--radius-md);
    background: #1e293b;
    border: 1px solid #334155;
    color: #ffffff;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-submit-btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    align-items: center;
}

.tag-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.75rem;
}

.tag-btn:hover {
    color: var(--primary-light);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    display: block;
}

/* IDE Code Preview Card */
.terminal-card {
    padding: 1.25rem;
}

.ide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #f43f5e; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.ide-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.code-box {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    background: var(--bg-terminal);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    line-height: 1.6;
}

.terminal-output {
    margin-top: 1rem;
    background: var(--bg-terminal);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border: 1px solid #1e293b;
}

.terminal-output-bar {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.6875rem;
    margin-bottom: 0.35rem;
}

.section-padding {
    padding: 4.5rem 0;
}

.section-bg {
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.section-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .section-title { font-size: 2.25rem; }
}

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

/* Filter Controls */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-btn:hover, .filter-btn.active-filter {
    background: var(--primary);
    color: var(--text-dark);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Course Cards Grid */
.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

@media (min-width: 640px) {
    .courses-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .courses-grid { grid-template-columns: repeat(3, 1fr); }
}

.course-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.course-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.badge {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

.badge-pink { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-cyan { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.course-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.course-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.module-list-mini {
    background: var(--bg-terminal);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    border: 1px solid #1e293b;
    margin-bottom: 1.25rem;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.module-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

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

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

.card-price {
    font-size: 1.125rem;
    font-weight: 800;
    color: #ffffff;
}

.card-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

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

@media (min-width: 992px) {
    .grid-2 { grid-template-columns: 1.1fr 0.9fr; }
}

.feature-box-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
}

@media (min-width: 640px) {
    .feature-box-grid { grid-template-columns: repeat(2, 1fr); }
}

.feature-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.feature-icon {
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.hall-of-fame-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.fame-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem;
    background: #0f172a;
    border-radius: var(--radius-sm);
    border: 1px solid #1e293b;
    font-size: 0.8125rem;
}

.fame-score {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary-light);
}

/* B.Tech Cards Grid */
.btech-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) { .btech-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .btech-grid { grid-template-columns: repeat(4, 1fr); } }

.univ-card {
    padding: 1.5rem;
    border-top: 4px solid var(--primary);
    transition: var(--transition);
}

.univ-card:hover {
    transform: translateY(-3px);
}

.univ-list {
    list-style: none;
    font-size: 0.75rem;
    color: #cbd5e1;
    margin: 1rem 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.univ-list li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    color: #ffffff;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.radio-tile-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.radio-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8125rem;
    color: #e2e8f0;
    transition: var(--transition);
}

.radio-tile:hover {
    border-color: var(--primary);
}

.fee-display-box {
    background: var(--bg-terminal);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.price-huge {
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--primary-light);
    line-height: 1;
}

.manifest-code-wrap {
    background: var(--bg-terminal);
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-sky);
    max-height: 300px;
    overflow-y: auto;
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.75rem;
}

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

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer */
.main-footer {
    background: #020617;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .footer-content {
        flex-direction: row;
    }
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

/* Responsiveness Tweaks */
@media (max-width: 768px) {
    .nav-links, .header-actions { display: none; }
    .mobile-menu-btn { display: block; }
}

/* Animations */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
