:root {
    --bg-color: #161512;
    /* Deep charcoal like Chess.com */
    --primary-color: #81b64c;
    /* Vibrant Chess-Green */
    --primary-light: #96c963;
    --secondary-color: #454545;
    /* Dark grey */
    --accent-color: #ff9800;
    /* Chess accent (like move highlights) */
    --text-color: #ffffff;
    --text-muted: #bababa;
    --glass-bg: rgba(38, 37, 34, 0.8);
    /* Lighter charcoal for cards */
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
    --board-pattern: rgba(255, 255, 255, 0.01);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    background-image:
        linear-gradient(45deg, var(--board-pattern) 25%, transparent 25%, transparent 75%, var(--board-pattern) 75%, var(--board-pattern)),
        linear-gradient(45deg, var(--board-pattern) 25%, transparent 25%, transparent 75%, var(--board-pattern) 75%, var(--board-pattern));
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #262522 0%, #161512 100%);
}

/* Typography & Utilities */
h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.2;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

.highlight {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-1 {
    background: var(--bg-color);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-2 {
    background: var(--primary-color);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-3 {
    background: linear-gradient(to right, #43e97b, #38f9d7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-4 {
    background: linear-gradient(to right, #fa709a, #fee140);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(129, 182, 76, 0.3);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(129, 182, 76, 0.5);
}

.btn-secondary {
    background: #3c3b39;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    background: #454545;
    transform: translateY(-2px);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.install-btn {
    position: relative;
    overflow: hidden;
}

.install-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@media (max-width: 768px) {
    .nav-buttons {
        gap: 0.5rem;
    }

    .nav-buttons .btn-primary,
    .nav-buttons .btn-secondary {
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
    }

    .install-btn {
        display: inline-flex !important;
    }
}

.hero-secondary-buttons {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--glass-bg);
    border: 1px solid var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.2);
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Glassmorphism Panels */
.glass-nav,
.glass-panel,
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Navbar */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.logo img.nav-logo-img {
    height: 35px;
    width: auto;
}

.logo i {
    color: var(--primary-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: white;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 5% 2rem;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    padding: 3rem;
    border-radius: 24px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.game-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 242, 254, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.live-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--glass-border);
}

.live-indicator {
    position: absolute;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff4757;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

/* App Mockup UI */
.phone-mockup {
    width: 300px;
    height: 600px;
    background: #111;
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 2px #333;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.phone-mockup .screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero-board-logo {
    width: 60%;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 242, 254, 0.6));
}

.board-icon {
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.3));
}

/* Features Section */
.features {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.slideshow-container {
    position: relative;
    max-width: 1000px;
    margin: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
    min-height: 500px;
}

.feature-slide {
    display: none;
    align-items: center;
    gap: 4rem;
}

.feature-slide.active {
    display: flex;
}

.feature-text {
    flex: 1;
}

.showcase-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.feature-text h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.feature-text p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: white;
}

.feature-list i {
    color: var(--primary-color);
}

.feature-img-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slideshow-mockup {
    width: 250px;
    height: 500px;
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

.slider-controls {
    text-align: center;
    margin-top: 2rem;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: var(--glass-border);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {
        opacity: .4
    }

    to {
        opacity: 1
    }
}

/* Download Banner */
.download-banner {
    margin: 4rem 5%;
    padding: 5rem 2rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.version-tag {
    display: inline-block;
    background: var(--primary-color);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.7rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px var(--primary-color);
}

.platform-support {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    opacity: 0.6;
}

.support-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.support-item i {
    color: var(--primary-color);
}

.large-btn {
    flex-direction: column;
    padding: 1.2rem 3rem;
    border-radius: 20px;
}

.large-btn h1 {
    font-size: 1.8rem;
    margin: 0;
}

.large-btn span {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Developer Section */
.developer-section {
    padding: 4rem 5%;
}

.dev-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 4rem;
    border-radius: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.avatar-ring {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    position: relative;
    animation: spin 10s linear infinite;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    /* Ensure bg shows if transparent */
    animation: spin 10s linear infinite reverse;
    /* Keep image upright */
}

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

.dev-info {
    flex: 1;
}

.dev-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dev-info h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Skills List */
.skills-tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skills-tags span {
    padding: 0.4rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    font-weight: 600;
}

.portfolio-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.portfolio-list li {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.portfolio-list strong {
    color: white;
}

.dev-links {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Floating Chess Pieces Background */
.floating-pieces {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.piece {
    position: absolute;
    color: rgba(255, 255, 255, 0.08);
    /* Increased visibility */
    font-size: 3rem;
    animation: drift 20s linear infinite;
    filter: blur(1px);
    /* Soft focus for depth */
}

.piece-1 {
    top: 10%;
    left: 10%;
    font-size: 5rem;
    animation-duration: 25s;
    animation-delay: 0s;
    color: rgba(0, 242, 254, 0.1);
}

.piece-2 {
    top: 70%;
    left: 80%;
    font-size: 8rem;
    animation-duration: 35s;
    animation-delay: -5s;
    color: rgba(0, 242, 254, 0.03);
}

.piece-3 {
    top: 40%;
    left: 90%;
    font-size: 4rem;
    animation-duration: 20s;
    animation-delay: -10s;
}

.piece-4 {
    top: 80%;
    left: 15%;
    font-size: 6rem;
    animation-duration: 30s;
    animation-delay: -15s;
    color: rgba(240, 147, 251, 0.08);
}

.piece-5 {
    top: 20%;
    left: 60%;
    font-size: 7rem;
    animation-duration: 40s;
    animation-delay: -20s;
}

.piece-6 {
    top: 50%;
    left: 30%;
    font-size: 3rem;
    animation-duration: 15s;
    animation-delay: -2s;
}

.piece-7 {
    top: 90%;
    left: 50%;
    font-size: 5rem;
    animation-duration: 28s;
    animation-delay: -8s;
}

@keyframes drift {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }

    100% {
        transform: translateY(-20vh) rotate(360deg);
    }
}

.social-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    padding: 2rem 5%;
    margin-top: 4rem;
}

.footer-content {
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

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

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

.footer-links a:hover,
.download-link {
    color: var(--primary-color) !important;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 242, 254, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0);
    }
}

.bounce-animation:hover {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 101;
}

/* Responsive */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(22, 21, 18, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        font-size: 1.5rem;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-buttons {
        display: none;
        /* Hide default buttons in nav, hero has them */
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .live-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .stat-divider {
        display: none;
    }

    .dev-container {
        flex-direction: column;
        text-align: center;
    }

    .dev-links {
        justify-content: center;
    }

    .feature-showcase,
    .feature-showcase.reverse {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
        text-align: center;
    }

    .feature-list li {
        justify-content: center;
    }

    .slideshow-container {
        padding: 2rem 1rem;
        min-height: auto;
    }

    .feature-slide {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .showcase-icon {
        margin-bottom: 0.5rem;
    }

    .download-banner {
        padding: 3rem 1rem;
    }

    .platform-support {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .live-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .phone-mockup {
        width: 100%;
        max-width: 300px;
        height: min(600px, 70vh);
    }
}