:root {
    --primary-green: #16a085;
    --highlight-yellow: #f1c40f;
    --highlight-cyan: #1abc9c;
    --dark-text: #2c3e50;
    --light-text: #ecf0f1;
    --subtle-gray: #bdc3c7;
    --bg-image: url('background.jpg');
    --accent: #f6b235;
    --accent-2: #ff8a00;
    --muted: rgba(255, 255, 255, 0.07);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-strong: rgba(255, 255, 255, 0.1);
    --text-on-dark: #f6f7f9;
    --card-radius: 14px;
    --transition: 240ms cubic-bezier(.2, .9, .2, 1);
}

body {
  /* Full page background + subtle vignette (lightened so background shows more) */
  background-image: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.28)), var(--bg-image);
  background-size: cover;
  background-position: center;
  color: var(--text-on-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle page overlay to keep text readable but allow background visibility */
.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.10); /* slight dark tint */
  z-index: 0;
}

/* NAVBAR: make glass lighter so background shows through more */
.navbar {
  background: linear-gradient(180deg, rgba(10,10,10,0.55), rgba(10,10,10,0.35));
  backdrop-filter: blur(6px) saturate(1.05);
  border-bottom: 1px solid var(--muted);
  padding: 12px 0;
}

.navbar .container {
    max-width: var(--max-width);
}

.navbar-brand {
    background: linear-gradient(90deg, var(--logo-bg) 0%, var(--accent-2) 100%);
    padding: 8px 10px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.5);
    align-items: center;
}

.navbar-brand img {
    height: 52px;
    width: 52px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* nav links: spaced and lighter */
.navbar-nav {
    gap: 18px;
    align-items: center;
}

.navbar-nav .nav-link {
    color: rgba(246, 178, 53, 0.92);
    font-weight: 600;
    padding: 8px 10px;
    transition: color var(--transition), transform var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--text-on-dark);
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero-section {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.8)),
        url('https://i.imgur.com/K1oK1tH.png');
    background-size: cover;
    background-position: center;
    height: 25vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    color: var(--dark-text);
}

.hero-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn-up 1s ease-out forwards;
}

.hero-section h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-section .highlight-yellow {
    color: var(--highlight-yellow);
}

.hero-section .highlight-cyan {
    color: var(--highlight-cyan);
}

/* gradient word emphasis for "Chess" */
.hero-content .highlight-cyan {
    background: linear-gradient(90deg, #6ee7ff, #4dd0e1 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-section p.subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #34495e;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* CTAs: pill buttons with shadow */
.btn-custom-primary,
.btn-custom-secondary,
.btn-final-cta {
    border-radius: 999px;
    padding: 12px 26px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(10, 10, 10, 0.45);
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-custom-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #111;
    border: none;
}

.btn-custom-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(255, 138, 0, 0.16);
}

.btn-custom-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-custom-secondary:hover {
    transform: translateY(-3px);
}

/* --- Tournament Info Section --- */
.info-section {
    background-color: var(--primary-green);
    color: var(--light-text);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: "\f441";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.05);
    left: 10%;
    top: 55%;
    transform: translateY(-50%) rotate(-15deg);
    z-index: 0;
}

.info-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.info-section p.subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4rem;
}

.info-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn-up 0.6s ease-out forwards;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.4s;
}

.info-card:nth-child(4) {
    animation-delay: 0.6s;
}

.info-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-10px);
}

.info-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.info-card .card-title {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.info-card .card-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text);
}

.placeholder-box {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    height: 150px;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.btn-final-cta {
    background-color: white;
    color: var(--dark-text);
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-final-cta:hover {
    background-color: #f8f9fa;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes fadeIn-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }

    .hero-section p.subtitle {
        font-size: 1.1rem;
    }

    .info-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        height: 80vh;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-section p.subtitle {
        font-size: 1rem;
    }

    .hero-buttons .btn {
        display: block;
        width: 80%;
        margin: 0.5rem auto;
    }

    .info-section h2 {
        font-size: 2rem;
    }

    .info-section::before {
        font-size: 10rem;
        left: -5%;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
}

/* inspiration carousel: elevated cards with inner shadow */
#inspiration .carousel-inner {
    padding: 8px;
}

#inspiration .carousel-item img {
    border-radius: 12px;
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.7);
    height: 420px;
    object-fit: cover;
}

/* changed: make caption background 50% opaque and improve text contrast */
#inspiration .carousel-caption {
    background: rgba(0, 0, 0, 0.5); /* 50% opaque black */
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    display: inline-block;
    backdrop-filter: blur(4px);
    transform: translateY(-8px);
    max-width: 85%;
}

/* highlight caption title and strengthen paragraph contrast */
#inspiration .carousel-caption h5 {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
}
#inspiration .carousel-caption p {
    color: rgba(255,255,255,0.95);
    margin-bottom: 0;
}

/* responsive tweak */
@media (max-width: 767px) {
    #inspiration .carousel-caption { padding: 8px 10px; max-width: 95%; }
}

/* FOOTER: translucent */
footer {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.75));
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 32px;
    padding-bottom: 32px;
}

/* responsiveness tweaks */
@media (max-width: 767px) {
    .navbar-brand img {
        height: 44px;
        width: 44px;
    }

    .hero-section {
        padding: 56px 16px;
    }

    .info-card {
        padding: 18px;
    }

    #inspiration .carousel-item img {
        height: 280px;
    }
}

/* subtle entrance animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Table Styling */
table {
  border-collapse: collapse;
  width: 100%;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

table thead {
  background-color: #0d6efd;
  color: #ffffff;
  font-weight: 600;
}

table th, table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #dddddd;
}

table tr:hover {
  background-color: #f2f5ff;
  transition: background-color 0.3s ease;
}

table a {
  color: #0d6efd;
  text-decoration: none;
}

table a:hover {
  text-decoration: underline;
}

.btn-custom-secondary {
  background-color: orange;
  color: white;
  border: 2px solid #black;
}

.btn-custom-secondary:hover {
  background-color: orange;
  color: black;
  border-color: black;
}
.hero-content {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

  }
}


/* usage: add .fade-in-up to hero content and call js to add .visible on load */
document.addEventListener &&
    (function () {
        try {
            window.addEventListener('load', function () {
                document.querySelectorAll('.fade-in-up').forEach(function (el) { el.classList.add('visible'); });
            });
        } catch (e) { }
    })();
