:root {
    --bg-dark: #0a0a0c;
    --bg-surface: #121217;
    --bg-glass: rgba(18, 18, 23, 0.65);
    --bg-glass-hover: rgba(26, 26, 34, 0.8);
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Deep modern glowing mesh background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 10%, var(--primary-glow) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, var(--accent-glow) 0%, transparent 35%),
        radial-gradient(circle at 50% 80%, rgba(79, 70, 229, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary-glow);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
}

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

.btn-primary-outline {
    border: 1px solid var(--border);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    background: transparent;
}

.btn-primary-outline:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.2);
}

/* Hero Section */
.hero {
    padding-top: 150px;
    padding-bottom: 60px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: #a5b4fc;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.15);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #a5b4fc, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* Search Wrapper */
.search-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-wrapper:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 1px var(--border-highlight);
    transform: translateY(-2px);
}

.search-form {
    display: flex;
    width: 100%;
}

.input-group {
    display: flex;
    width: 100%;
    align-items: center;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1.2rem 1rem 1.2rem 3.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.btn-search {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 2rem;
    height: 3rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-search:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.02);
}

.btn-search:active {
    transform: scale(0.98);
}

/* Loader */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results */
.results-container {
    max-width: 800px;
    margin: 3rem auto 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: none;
}

.results-container.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
    transition: all 0.3s ease;
    animation: fadeUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result-card:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

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

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

.hsn-info {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.hsn-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hsn-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gst-badge {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.gst-rate {
    font-weight: 700;
    color: #67e8f9;
    font-size: 1.1rem;
}

.gst-label {
    font-size: 0.75rem;
    color: #a5b4fc;
    font-weight: 600;
    text-transform: uppercase;
}

.chapter-name {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.hsn-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.result-empty {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.result-empty svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.result-empty h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.result-empty p {
    color: var(--text-secondary);
}

/* Article content (glassmorphism) */
.article-content {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 4rem;
    margin-bottom: 4rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.prose {
    max-width: 800px;
    margin: 0 auto;
}

.prose h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.prose p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.prose b {
    color: #e2e8f0;
}

.prose ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose li strong {
    color: #e2e8f0;
}

.share-links {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    background: rgba(10, 10, 12, 0.8);
}

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

.copyright {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .article-content {
        padding: 2rem;
    }
    .search-wrapper {
        border-radius: 16px;
    }
    .input-group {
        flex-direction: column;
    }
    .search-icon {
        top: 1.2rem;
    }
    .input-group input {
        width: 100%;
        padding: 1.2rem 1rem 1.2rem 3.5rem;
        border-bottom: 1px solid var(--border);
        border-radius: 16px 16px 0 0;
    }
    .btn-search {
        width: 100%;
        border-radius: 0 0 16px 16px;
        height: 3.5rem;
    }
    .nav-links {
        display: none; /* simple mobile hide for demo */
    }
}