/* 21st Malaysian Chess Festival 2026 - Main Stylesheet (Esports World Cup Inspiration) */

:root {
    --bg-main: #05070f;
    --bg-card: rgba(13, 18, 36, 0.7);
    --bg-navbar: rgba(5, 7, 15, 0.85);
    --primary: #00e5ff; /* Ice Blue */
    --secondary: #ffb700; /* Gold */
    --accent: #ff007f; /* Cyber Pink */
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 229, 255, 0.2);
    --border-glow-gold: rgba(255, 183, 0, 0.2);
    --font-heading: 'Space Grotesk', 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --max-width: 1400px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 229, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 183, 0, 0.05) 0%, transparent 40%),
        linear-gradient(rgba(5, 7, 15, 0.97) 0%, rgba(5, 7, 15, 0.99) 100%);
    background-attachment: fixed;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

h1 {
    text-transform: uppercase;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    text-transform: uppercase;
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(5, 7, 15, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo span {
    background: linear-gradient(90deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--primary));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.register-btn {
    background: linear-gradient(135deg, var(--secondary), #ff8800);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding: 0.8rem 1.6rem;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(255, 183, 0, 0.3);
    transition: var(--transition);
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 183, 0, 0.5);
    filter: brightness(1.1);
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    padding-top: 120px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    filter: saturate(1.5) contrast(1.2);
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, transparent 70%);
    top: 20%;
    right: -10%;
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-tagline::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--secondary);
}

.hero h1 span.highlight {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.2));
}

.hero p {
    font-size: 1.25rem;
    margin: 1.5rem 0 2.5rem 0;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00a8ff);
    color: var(--text-dark);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(0, 229, 255, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--border-glow);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--border-glow);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.glass-card:hover::before {
    transform: translateX(100%);
}

/* Grid & Section Layout */
.section {
    padding: 6rem 0;
    position: relative;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

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

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

.section-title {
    margin-bottom: 1rem;
}

/* Info Grid / Event Cards */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-heading);
}

.event-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-weight: 600;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.event-desc {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.event-prize-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prize-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.prize-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: var(--font-heading);
}

/* Timeline/Schedule */
.schedule-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.schedule-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.2;
}

.schedule-date-group {
    margin-bottom: 3.5rem;
    position: relative;
}

.date-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    padding-left: 70px;
    text-transform: uppercase;
}

.schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    position: relative;
    padding-left: 70px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 14px;
    width: 10px;
    height: 10px;
    background: var(--bg-main);
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition);
    box-shadow: 0 0 8px var(--primary);
}

.timeline-item:hover::before {
    background: var(--primary);
    transform: scale(1.3);
}

.timeline-content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    transition: var(--transition);
}

.timeline-content-card:hover {
    border-color: rgba(0, 229, 255, 0.2);
    background: rgba(13, 18, 36, 0.85);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.timeline-time {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    min-width: 100px;
    white-space: nowrap;
}

.timeline-details h4 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.timeline-details p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.timeline-location {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}

/* Beautiful Prizes Table style */
.prize-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 2rem;
}

.prize-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.prize-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.prize-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: #e2e8f0;
}

.prize-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.prize-table tr:last-child td {
    border-bottom: none;
}

/* Modern Sleek Forms */
.form-container {
    max-width: 650px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.form-control,
select,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(13, 18, 36, 0.6);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

option {
    background: #0d1224;
    color: var(--text-main);
}

/* Quick Countdown widget */
.countdown-box {
    background: linear-gradient(135deg, rgba(13, 18, 36, 0.9), rgba(5, 7, 15, 0.95));
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    margin-top: 3rem;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.countdown-item {
    min-width: 90px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1rem 0.5rem;
    border-radius: 4px;
}

.countdown-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    display: block;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Footer Section */
.footer {
    background: #020307;
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2.5rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-section h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

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

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Category Filter Navigation */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Hero features badges */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 5rem;
}

.feature-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.feature-box:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--border-glow);
}

.feature-icon {
    font-size: 2rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 5px var(--secondary));
}

.feature-details h4 {
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.feature-details p {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

/* Alerts and banners */
.alert-banner {
    background: linear-gradient(90deg, rgba(255, 183, 0, 0.15), rgba(255, 0, 127, 0.05));
    border-left: 4px solid var(--secondary);
    padding: 1.25rem 2rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-banner p {
    margin: 0;
    font-size: 0.95rem;
    color: #ffd000;
}

/* News List Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    display: flex;
    flex-direction: column;
}

.news-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 4px 4px 0 0;
    border-bottom: 2px solid var(--primary);
}

.news-content {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    flex-grow: 1;
}

.news-date {
    font-size: 0.8rem;
    color: var(--primary);
    font-family: var(--font-heading);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.news-card p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #070a14;
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .navbar.active {
        background: #070a14;
    }
    
    .register-btn {
        display: none; /* Can trigger via menu on mobile */
    }
    
    .hero {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-btns {
        justify-content: center;
    }
}
