:root {
    --primary: #eab308;
    --primary-dark: #ca8a04;
    --secondary: #1e293b;
    --accent: #334155;
    --background: #020617;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-primary: rgba(234, 179, 8, 0.2);
    --card-bg: rgba(30, 41, 59, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Sarabun', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Grid */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(to right, #1e293b 1px, transparent 1px),
        linear-gradient(to bottom, #1e293b 1px, transparent 1px);
    background-size: 4rem 4rem;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
    opacity: 0.2;
}

.bg-gradient-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, transparent, var(--background));
}

/* Navbar */
nav {
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    height: 4rem;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-logo img {
    height: 2.5rem;
    width: 2.5rem;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 4rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.emblem-container {
    position: relative;
    width: 12rem;
    height: 12rem;
    margin-bottom: 2rem;
}

.emblem-blur {
    position: absolute;
    inset: 0;
    background: rgba(234, 179, 8, 0.2);
    filter: blur(40px);
    border-radius: 50%;
}

.emblem-container img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(234, 179, 8, 0.3));
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

.badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 42rem;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--background);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px -5px rgba(234, 179, 8, 0.5);
}

.btn-primary:hover {
    background: white;
    transform: scale(1.05);
}

.btn-secondary {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.btn-secondary:hover {
    color: var(--primary);
}

/* Glass Card */
.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    border-color: rgba(234, 179, 8, 0.4);
    box-shadow: 0 0 25px var(--shadow-primary);
    transform: translateY(-5px);
}

/* Page Headers Global */
.page-header {
    padding: clamp(3rem, 10vh, 6rem) 1rem 3rem;
    text-align: center;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-top: 1.5rem;
    text-align: center;
    width: 100%;
}

.page-header p {
    text-align: center;
}

/* Grids Global */
.content-grid {
    max-width: 1280px;
    margin: 0 auto 5rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Shared Components */
.category-tag, .diff-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
}

.category-tag {
    background: rgba(234, 179, 8, 0.1);
    color: var(--primary);
    border: 1px solid rgba(234, 179, 8, 0.2);
}

/* Back Link Global */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

/* Feature Grid */
.features {
    padding: 4rem 1rem;
}

.features-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 2.5rem;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Footer */
footer {
    padding: 4rem 1rem;
    border-top: 1px solid var(--glass-border);
    background: var(--glass);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .features-container, .laws-grid {
        grid-template-columns: 1fr;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }
}