@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

body {
    font-family: 'Orbitron', sans-serif;
    background: url('pip.jpeg') no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.glow {
    color: #00ff8c;
    font-size: 3em;
    font-weight: 700;
    text-shadow:
        0 0 5px #00ffe0,
        0 0 10px #00ffe0,
        0 0 20px #00ffe0,
        0 0 30px #00ffc8,
        0 0 40px #00ffc8;
    animation: pulseGlow 5.5s infinite alternate;
}

@keyframes pulseGlow {
    from {
        text-shadow:
            0 0 5px #00ffe0,
            0 0 10px #00ffe0;
    }
    to {
        text-shadow:
            0 0 20px #00ffc8,
            0 0 40px #00ffc8;
    }
}

.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}


/* START SCREEN - Futuristic Bhari Upgrade */
#start-screen {
    position: fixed;
    width: 100%;
    height: 100%;
    background: url('p.jpeg') no-repeat center center fixed;
    background-size: cover;
    background-blend-mode: overlay;
    background-color: rgba(0, 0, 0, 0.65); /* Slightly darker for depth */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
    animation: fadeIn 15s ease-in-out, moveBG 8s ease-in-out infinite alternate;
    backdrop-filter: blur(4px); /* slight blur for mystic touch */
    box-shadow: inset 0 0 120px rgba(0, 255, 255, 0.05);
}

/* Background movement */
@keyframes moveBG {
    0% {
        background-position: center;
        transform: scale(1);
    }
    100% {
        background-position: top right;
        transform: scale(1.1);
    }
}

/* Smooth fade-in effect */
@keyframes fadeIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}



/* COMPACT & STYLISH GLASS PANEL */
.glass-panel {
    width: 80%;
    max-width: 500px;
    margin: 50px auto;
    background: rgba(0, 255, 255, 0.03); /* more glassy */
    border: 1.5px solid rgba(0, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1),
                0 0 40px rgba(0, 255, 255, 0.08),
                inset 0 0 10px rgba(0, 255, 255, 0.1);
}
.super-text {
    text-align: center;
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    background: linear-gradient(90deg, #00ffff, #00ff87, #00ffc3, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: floatCard 8s ease-in-out infinite, glowText 5s ease-in-out infinite;
    transition: all 0.4s ease-in-out;
    transform-style: preserve-3d;
    text-shadow:
        0 0 5px rgba(0, 255, 255, 0.4),
        0 0 10px rgba(0, 255, 200, 0.5),
        0 0 20px rgba(0, 255, 180, 0.6);
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0px) rotateX(0deg) rotateY(0deg);
    }
    50% {
        transform: translateY(-15px) rotateX(3deg) rotateY(3deg);
    }
}

@keyframes glowText {
    0% {
        text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffc3, 0 0 20px #00ffb2;
    }
    50% {
        text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffc3, 0 0 40px #00ffb2;
    }
    100% {
        text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffc3, 0 0 20px #00ffb2;
    }
}



.glass-panel:hover {
    transform: scale(1.05) rotateX(1deg) rotateY(1deg);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5),
                0 0 80px rgba(0, 255, 255, 0.3),
                inset 0 0 20px rgba(0, 255, 255, 0.2);
}

@keyframes floatCard {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0px);
    }
}




/* Base Neon Button */
.btn {
    background: linear-gradient(135deg, #00f0ff, #008cff);
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
    margin: 15px;
    border-radius: 15px;
    transition: 0.4s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6),
                0 0 40px rgba(0, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px cyan, 0 0 55px #00ffe7;
    background: linear-gradient(135deg, #00ffd5, #0049ff);
}

/* Neon Glass Button with Pulse Effect */
.btn.neon {
    font-size: 1.3rem;
    border: 2px solid #00fff2;
    background: rgba(0, 255, 255, 0.05);
    color: #00fff2;
    padding: 15px 35px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    box-shadow: 0 0 12px #00fff2,
                inset 0 0 10px rgba(0, 255, 255, 0.2);
    animation: neonPulse 2s infinite alternate;
    text-shadow: 0 0 5px cyan;
    backdrop-filter: blur(8px);
}

.btn.neon:hover {
    background: rgba(0, 0, 0, 0.5);
    color: #00ff94;
    box-shadow: 0 0 25px #00ff94, 0 0 40px #00ffc3;
    transform: scale(1.08);
}

@keyframes neonPulse {
    0% {
        box-shadow: 0 0 8px #00fff2, inset 0 0 5px rgba(0, 255, 255, 0.2);
    }
    100% {
        box-shadow: 0 0 25px #00fff2, inset 0 0 15px rgba(0, 255, 255, 0.4);
    }
}

.glitch-text {
    font-size: 3rem;
    color: #0ff;
    font-family: 'Orbitron', sans-serif;
    position: relative;
    animation: flicker 2s infinite alternate;
    text-shadow:
        0 0 5px #0ff,
        0 0 10px #0ff,
        0 0 20px #00ffe1,
        0 0 30px #00ffc3,
        0 0 40px #00ffdd,
        0 0 60px #00eaff;
    transition: all 0.3s ease;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    color: #0ff;
    background: transparent;
}

.glitch-text::before {
    top: -1px;
    left: 2px;
    color: #f0f;
    z-index: -1;
    animation: glitchTop 1.5s infinite linear alternate-reverse;
}

.glitch-text::after {
    top: 1px;
    left: -2px;
    color: #ff0;
    z-index: -2;
    animation: glitchBottom 1.5s infinite linear alternate-reverse;
}

@keyframes glitchTop {
    0% { clip-path: inset(0 0 85% 0); }
    25% { clip-path: inset(0 0 40% 0); }
    50% { clip-path: inset(0 0 20% 0); }
    75% { clip-path: inset(0 0 60% 0); }
    100% { clip-path: inset(0 0 85% 0); }
}

@keyframes glitchBottom {
    0% { clip-path: inset(85% 0 0 0); }
    25% { clip-path: inset(60% 0 0 0); }
    50% { clip-path: inset(40% 0 0 0); }
    75% { clip-path: inset(20% 0 0 0); }
    100% { clip-path: inset(85% 0 0 0); }
}

@keyframes flicker {
    0% { opacity: 1; }
    45% { opacity: 0.7; }
    60% { opacity: 1; }
    75% { opacity: 0.3; }
    100% { opacity: 1; }
}


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

/* Body and Layout */
body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a; /* Dark background for the chessboard */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Chess Board Container */
#board-container {
    width: 100%;
    max-width: 600px; /* Max width for desktop */
    margin: 20px auto;
    animation: fadeInBoard 0.8s ease-in-out forwards;
}

/* Chess Board Styles */
#board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    background: #1a1a1a;
    border: 4px solid #0ff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

/* Individual Cells */
.cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    border-radius: 6px;
}

/* White and Black Cell Styles */
.white {
    background: linear-gradient(145deg, #e0e0e0, #ffffff);
    color: #222;
}

.black {
    background: linear-gradient(145deg, #333, #555);
    color: #fff;
}

/* Mobile-Friendly Chessboard */
@media (max-width: 768px) {
    #board {
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 1px;
        padding: 5px;
    }

    .cell {
        font-size: 22px; /* Adjust font size for smaller devices */
        width: 50px; /* Adjust cell size */
        height: 50px; /* Adjust cell size */
    }

    /* Adjusting the border and padding of the board */
    #board-container {
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }
}

/* Responsive for Smaller Screens */
@media (max-width: 480px) {
    #board {
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 1px;
    }

    .cell {
        width: 40px; /* Smaller cell size on mobile */
        height: 40px; /* Smaller cell size on mobile */
        font-size: 18px; /* Smaller font size on mobile */
    }

    /* Adjusting the board container for better view on mobile */
    #board-container {
        width: 100%;
        padding: 10px;
    }
}

/* Keyframes for Fade-In Animation */
@keyframes fadeInBoard {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
