#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

#loading-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

#loading-text-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 5rem;
    font-weight: 900;
    color: white;
    display: flex;
    gap: 20px;
    align-items: center;
}

#loading-footer {
    color: rgba(255, 255, 255, 0.4);
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: -10px;
    opacity: 0;
    animation: loading-footer-fade 1s ease-out 2.5s forwards;
}

@keyframes loading-footer-fade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#loading-skip-hint {
    position: absolute;
    bottom: 40px;
    color: rgba(255, 255, 255, 0.4);
    font-family: inherit;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.2; }
    50% { opacity: 0.6; }
    100% { opacity: 0.2; }
}

#loading-the {
    opacity: 0;
    transform: translateY(-1000px);
    animation: fall-and-crack 1s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

#loading-clicker {
    opacity: 0;
    transform: translateY(-1000px);
    animation: fall-simple 1s cubic-bezier(0.6, -0.28, 0.735, 0.045) 1.5s forwards;
}

@keyframes fall-and-crack {
    0% { transform: translateY(-1000px); opacity: 0; }
    70% { transform: translateY(0); opacity: 1; clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
    85% { transform: translateY(0) scaleY(0.9); clip-path: polygon(0% 0%, 50% 10%, 100% 0%, 100% 100%, 50% 90%, 0% 100%); }
    100% { transform: translateY(0) scaleY(1); opacity: 1; clip-path: polygon(0% 0%, 45% 20%, 50% 10%, 55% 20%, 100% 0%, 100% 100%, 55% 80%, 50% 90%, 45% 80%, 0% 100%); }
}

@keyframes fall-simple {
    0% { transform: translateY(-1000px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#ui-left {
    position: absolute;
    top: 20px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#ui-bottom-left {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

#open-skins-btn, #open-wallpapers-btn, #open-sounds-btn, #open-auras-btn {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s;
    width: 170px;
}

#open-auras-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

#open-sounds-btn {
    background: linear-gradient(135deg, #ff9966, #ff5e62);
}

#open-wallpapers-btn {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
}

#rubiks-controls {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cube-btn {
    font-size: 0.7rem;
    padding: 5px;
    background: #444;
    color: white;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
}
.cube-btn:hover { background: #666; }

#computer-controls {
    margin-top: 10px;
    padding: 5px;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 170px;
}
.comp-btn {
    font-size: 0.6rem;
    padding: 3px;
    background: #444;
    color: white;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
}
.comp-btn:hover { background: #666; }

#wallpaper-monitor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

#wallpaper-monitor::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.8;
}

/* Screensaver Effects */
#circle.computer-3d.saver-matrix::before, #wallpaper-monitor.saver-matrix::before {
    background: #000 !important;
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px) !important;
    background-size: 10px 10px !important;
    opacity: 1 !important;
    content: "101010110" !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #0f0 !important;
    font-family: monospace;
    font-size: 0.8rem;
    text-shadow: 0 0 5px #0f0;
    overflow: hidden;
    animation: matrix-flicker 0.2s infinite;
    pointer-events: none !important;
}
#wallpaper-monitor.saver-matrix::before { font-size: 2rem; content: "101010110 01010101 11001100 00110011" !important; }
@keyframes matrix-flicker { 0% { opacity: 0.8; } 50% { opacity: 1; } 100% { opacity: 0.9; } }

#circle.computer-3d.saver-bsod::before, #wallpaper-monitor.saver-bsod::before {
    background: #0000aa !important;
    content: "CRITICAL_ERROR :(" !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: white !important;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 1 !important;
    text-align: center;
    padding: 10px;
    pointer-events: none !important;
}
#wallpaper-monitor.saver-bsod::before { font-size: 3rem; }

#circle.computer-3d.saver-static::before, #wallpaper-monitor.saver-static::before {
    background: #222 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)'/%3E%3C/svg%3E") !important;
    opacity: 1 !important;
    animation: static-noise 0.1s infinite;
    pointer-events: none !important;
}
@keyframes static-noise { 0% { transform: translate(1px, 1px); } 50% { transform: translate(-1px, -1px); } 100% { transform: translate(0, 0); } }

#circle.computer-3d.saver-retro::before, #wallpaper-monitor.saver-retro::before {
    background: #000 !important;
    background-image: repeating-linear-gradient(0deg, rgba(0, 255, 0, 0.1) 0px, rgba(0, 255, 0, 0.1) 1px, transparent 1px, transparent 2px) !important;
    content: "C:\> _" !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #0f0 !important;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    opacity: 1 !important;
    text-shadow: 0 0 10px #0f0;
    pointer-events: none !important;
}
#wallpaper-monitor.saver-retro::before { font-size: 5rem; content: "C:\> CLICKING_IN_PROGRESS..." !important; }

#circle.computer-3d.saver-space::before, #wallpaper-monitor.saver-space::before {
    background: #000 !important;
    background-image: 
        radial-gradient(circle at 20% 30%, #fff 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, #fff 1px, transparent 1px),
        radial-gradient(circle at 50% 80%, #fff 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, #fff 1px, transparent 1px) !important;
    background-size: 50px 50px !important;
    opacity: 1 !important;
    animation: space-scroll 10s linear infinite;
    pointer-events: none !important;
}
@keyframes space-scroll { from { background-position: 0 0; } to { background-position: 100px 100px; } }

#circle.computer-3d.saver-dvd::before, #wallpaper-monitor.saver-dvd::before {
    background: #000 !important;
    content: "DVD" !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #ff00ff !important;
    font-weight: bold;
    font-size: 1.5rem;
    opacity: 1 !important;
    animation: dvd-bounce 4s linear infinite alternate, dvd-color 8s linear infinite;
    pointer-events: none !important;
}
#wallpaper-monitor.saver-dvd::before { font-size: 5rem; }
@keyframes dvd-bounce {
    0% { transform: translate(-40px, -30px); }
    100% { transform: translate(40px, 30px); }
}
#wallpaper-monitor.saver-dvd::before {
    animation: dvd-bounce-large 10s linear infinite alternate, dvd-color 8s linear infinite;
}
@keyframes dvd-bounce-large {
    0% { transform: translate(-40vw, -30vh); }
    100% { transform: translate(40vw, 30vh); }
}
@keyframes dvd-color {
    0% { color: #ff00ff; }
    33% { color: #00ffff; }
    66% { color: #ffff00; }
    100% { color: #ff00ff; }
}

#circle.computer-3d.saver-night::before, #wallpaper-monitor.saver-night::before {
    background: linear-gradient(to bottom, #001f3f, #000) !important;
    background-image: 
        radial-gradient(circle at 70% 30%, #fff 15px, transparent 16px),
        radial-gradient(circle at 75% 35%, #001f3f 15px, transparent 16px),
        radial-gradient(circle at 20% 20%, #fff 1px, transparent 1px),
        radial-gradient(circle at 40% 50%, #fff 1px, transparent 1px),
        radial-gradient(circle at 10% 80%, #fff 1px, transparent 1px) !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

#circle.computer-3d.saver-simpsons::before, #wallpaper-monitor.saver-simpsons::before {
    background: #000 !important;
    content: "SIMPSONS" !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: #ffd900 !important;
    font-weight: 900 !important;
    font-size: 2.5rem !important;
    text-shadow: 0 0 15px #ffd900, 0 0 30px #ff0;
    opacity: 1 !important;
    animation: simpsons-bounce 4s linear infinite alternate;
    pointer-events: none !important;
}
#wallpaper-monitor.saver-simpsons::before { font-size: 15rem !important; animation: simpsons-bounce-large 6s linear infinite alternate; }

@keyframes simpsons-bounce {
    0% { transform: translate(-30px, -20px) rotate(-15deg); }
    100% { transform: translate(30px, 20px) rotate(15deg); }
}
@keyframes simpsons-bounce-large {
    0% { transform: translate(-35vw, -25vh) rotate(-15deg); }
    100% { transform: translate(35vw, 25vh) rotate(15deg); }
}

#circle.computer-3d.saver-toaster::before, #wallpaper-monitor.saver-toaster::before {
    background: linear-gradient(to bottom, #f4d03f, #16a085) !important;
    content: "🍞" !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 6rem !important;
    opacity: 1 !important;
    animation: toaster-fly 2s linear infinite;
    text-shadow: 20px 10px 0 rgba(0,0,0,0.1);
    pointer-events: none !important;
}
#wallpaper-monitor.saver-toaster::before { font-size: 20rem !important; animation: toaster-fly-large 4s linear infinite; }

@keyframes toaster-fly {
    from { transform: translateX(-100px) rotate(-25deg); }
    to { transform: translateX(100px) rotate(25deg); }
}
@keyframes toaster-fly-large {
    from { transform: translateX(-70vw) rotate(-25deg); }
    to { transform: translateX(70vw) rotate(25deg); }
}

/* 3D Rubik's Cube Styling */
#circle.rubiks-3d {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    background: #111 !important;
    box-shadow: 
        0 15px 0 #000,
        0 20px 30px rgba(0,0,0,0.5);
    position: relative;
    transform: rotateX(20deg) rotateY(20deg);
    padding: 8px;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(3, 1fr) !important;
    gap: 6px !important;
    box-sizing: border-box;
}

#circle.rubiks-3d #circle-icon {
    display: none !important;
}

#circle.rubiks-3d .cube-face {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background-color: var(--c1, #fff) !important;
    border: 2px solid rgba(0,0,0,0.2);
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

/* 3D Computer Styling */
#circle.computer-3d {
    width: 200px;
    height: 150px;
    border-radius: 12px;
    background: #2c3e50 !important;
    border: 10px solid #1a1a1a;
    box-shadow: 
        0 12px 0 #000,
        0 25px 35px rgba(0,0,0,0.4);
    position: relative;
    transform: rotateX(10deg);
}

#circle.computer-3d::before {
    content: "";
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    background: linear-gradient(135deg, #00d4ff, #0055ff);
    border-radius: 4px;
    opacity: 0.8;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.3);
    animation: screen-flicker 4s infinite;
}

@keyframes screen-flicker {
    0% { opacity: 0.8; }
    50% { opacity: 0.9; }
    52% { opacity: 0.75; }
    54% { opacity: 0.85; }
    100% { opacity: 0.8; }
}

#circle.computer-3d::after {
    content: "";
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 35px;
    background: #1a1a1a;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    z-index: -1;
}

#circle.computer-3d #circle-icon {
    position: absolute;
    width: 100%; height: 100%;
    background: 
        repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 4px);
    display: block;
    z-index: 2;
}

#circle.radioactive-can {
    width: 100px;
    height: 150px;
    border-radius: 15px / 30px;
    background: linear-gradient(to right, #222 0%, #444 50%, #222 100%);
    border: 4px solid #000;
    box-shadow: 0 0 25px rgba(86, 171, 47, 0.8), inset 0 0 15px rgba(86, 171, 47, 0.4);
    position: relative;
    overflow: visible;
}

#circle.radioactive-can::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -4px;
    width: 100px;
    height: 20px;
    background: #333;
    border: 4px solid #000;
    border-radius: 50%;
}

#circle.radioactive-can::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: -4px;
    width: 100px;
    height: 20px;
    background: #111;
    border: 4px solid #000;
    border-radius: 50%;
}

#circle.radioactive-can #circle-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 10px #56ab2f);
    z-index: 2;
}

/* 3D Donut Styling */
#circle.donut-3d {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #f3e5ab !important;
    border: 35px solid #ffb7c5;
    box-sizing: border-box;
    box-shadow: 
        0 15px 0 #d2b48c,
        0 20px 30px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    transform: rotateX(30deg);
}

#circle.donut-3d::before {
    content: "";
    position: absolute;
    top: -25px; left: -25px; right: -25px; bottom: -25px;
    border-radius: 50%;
    background-image: 
        radial-gradient(circle at 30% 30%, #fff 2px, transparent 4px),
        radial-gradient(circle at 70% 20%, #ff0 2px, transparent 4px),
        radial-gradient(circle at 80% 60%, #0f0 2px, transparent 4px),
        radial-gradient(circle at 20% 80%, #f00 2px, transparent 4px),
        radial-gradient(circle at 50% 10%, #00f 2px, transparent 4px),
        radial-gradient(circle at 90% 40%, #f0f 2px, transparent 4px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 5;
}

#circle.donut-3d::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 30px; height: 30px;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    box-shadow: inset 0 5px 15px #000;
}

/* 3D Controller Styling */
#circle.controller-3d {
    width: 180px;
    height: 100px;
    border-radius: 35px 35px 50px 50px;
    background: linear-gradient(135deg, #444, #222) !important;
    border: 1px solid #111;
    box-shadow: 
        0 12px 0 #111,
        0 20px 30px rgba(0,0,0,0.5);
    position: relative;
    transform: rotateX(20deg);
}

#circle.controller-3d::before, #circle.controller-3d::after {
    content: "";
    position: absolute;
    bottom: -30px;
    width: 70px;
    height: 90px;
    background: linear-gradient(to bottom, #333, #111);
    border-radius: 30px;
    box-shadow: 0 10px 0 #000;
    z-index: -1;
}
#circle.controller-3d::before { left: -10px; transform: rotate(25deg); }
#circle.controller-3d::after { right: -10px; transform: rotate(-25deg); }

#circle.controller-3d #circle-icon {
    position: absolute;
    width: 100%; height: 100%;
    background: 
        /* ABXY Buttons */
        radial-gradient(circle at 140px 35px, #e74c3c 8px, transparent 9px), /* B */
        radial-gradient(circle at 125px 50px, #2ecc71 8px, transparent 9px), /* A */
        radial-gradient(circle at 125px 20px, #f1c40f 8px, transparent 9px), /* Y */
        radial-gradient(circle at 110px 35px, #3498db 8px, transparent 9px), /* X */
        /* D-Pad */
        linear-gradient(to right, #111 20px, transparent 20px) 30px 35px / 20px 6px no-repeat,
        linear-gradient(to bottom, #111 20px, transparent 20px) 37px 28px / 6px 20px no-repeat;
    display: block;
}

/* 3D Robot Styling */
#circle.robot-3d {
    width: 140px;
    height: 140px;
    border-radius: 25px;
    background: linear-gradient(135deg, #bdc3c7, #95a5a6) !important;
    border: 5px solid #7f8c8d;
    box-shadow: 
        0 15px 0 #7f8c8d,
        inset -8px -8px 0 rgba(0,0,0,0.1),
        0 20px 25px rgba(0,0,0,0.3);
    position: relative;
    transform: rotateX(15deg);
}

#circle.robot-3d::before {
    content: "";
    position: absolute;
    top: 30px; left: 30px;
    width: 25px; height: 25px;
    background: #00d4ff;
    border-radius: 5px;
    box-shadow: 
        0 0 15px #00d4ff,
        55px 0 0 #00d4ff,
        55px 0 15px #00d4ff;
    animation: eye-glow 2s infinite alternate;
}

#circle.robot-3d #circle-icon {
    position: absolute;
    width: 100%; height: 100%;
    background: 
        /* Mouth Grill */
        repeating-linear-gradient(to right, #333, #333 4px, transparent 4px, transparent 8px) 40px 90px / 60px 15px no-repeat,
        /* Panel Lines */
        linear-gradient(to bottom, rgba(0,0,0,0.1) 1px, transparent 1px) 0 70px / 100% 2px no-repeat;
    display: block;
}

/* 3D Skull Styling */
#circle.skull-3d {
    width: 120px;
    height: 140px;
    border-radius: 50% 50% 35% 35%;
    background: radial-gradient(circle at 30% 30%, #fff, #ecf0f1) !important;
    box-shadow: 
        0 15px 0 #bdc3c7,
        inset -10px -10px 20px rgba(0,0,0,0.05),
        0 20px 30px rgba(0,0,0,0.3);
    position: relative;
    transform: rotateX(15deg);
}

#circle.skull-3d::before, #circle.skull-3d::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 25px;
    background: #ecf0f1;
    border-radius: 12px;
    top: 60px;
    left: -20px;
    z-index: -2;
    box-shadow: 0 10px 0 #bdc3c7;
}
#circle.skull-3d::before { transform: rotate(45deg); }
#circle.skull-3d::after { transform: rotate(-45deg); }

#circle.skull-3d #circle-icon {
    position: absolute;
    width: 100%; height: 100%;
    background: 
        /* Eyes */
        radial-gradient(circle at 35px 60px, #111 18px, transparent 19px),
        radial-gradient(circle at 85px 60px, #111 18px, transparent 19px),
        /* Nose */
        conic-gradient(from 150deg at 60px 85px, #111 60deg, transparent 0) 0 0 / 100% 100% no-repeat,
        /* Teeth */
        repeating-linear-gradient(to right, #bdc3c7, #bdc3c7 2px, transparent 2px, transparent 10px) 45px 120px / 30px 15px no-repeat;
    display: block;
}

/* 3D Dice Styling */
#circle.dice-3d {
    width: 130px;
    height: 130px;
    border-radius: 25px;
    background: linear-gradient(135deg, #fff, #eee) !important;
    border: 1px solid #ccc;
    box-shadow: 
        0 12px 0 #bdc3c7,
        inset -5px -5px 15px rgba(0,0,0,0.1),
        0 20px 30px rgba(0,0,0,0.2);
    position: relative;
    transform: rotateX(20deg) rotateY(10deg);
}

#circle.dice-3d #circle-icon {
    position: absolute;
    width: 100%; height: 100%;
    background: 
        /* Dice Pips (5 layout) */
        radial-gradient(circle at 35px 35px, #222 12px, transparent 13px),
        radial-gradient(circle at 95px 35px, #222 12px, transparent 13px),
        radial-gradient(circle at 65px 65px, #222 12px, transparent 13px),
        radial-gradient(circle at 35px 95px, #222 12px, transparent 13px),
        radial-gradient(circle at 95px 95px, #222 12px, transparent 13px);
    display: block;
}

/* 3D Penguin Styling */
#circle.penguin-3d {
    width: 120px;
    height: 150px;
    border-radius: 50% 50% 45% 45%;
    background: radial-gradient(circle at 50% 40%, #fff 35%, #111 36%) !important;
    border: 4px solid #000;
    box-shadow: 
        0 12px 0 #000,
        0 20px 25px rgba(0,0,0,0.3);
    position: relative;
    transform: rotateX(10deg);
}

#circle.penguin-3d::before, #circle.penguin-3d::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 80px;
    background: #111;
    border-radius: 50%;
    top: 30px;
    z-index: -1;
}
#circle.penguin-3d::before { left: -15px; transform: rotate(-20deg); }
#circle.penguin-3d::after { right: -15px; transform: rotate(20deg); }

#circle.penguin-3d #circle-icon {
    position: absolute;
    width: 100%; height: 100%;
    background: 
        /* Eyes */
        radial-gradient(circle at 45px 50px, #000 4px, transparent 5px),
        radial-gradient(circle at 75px 50px, #000 4px, transparent 5px),
        /* Beak */
        conic-gradient(from 150deg at 60px 65px, #ffa500 60deg, transparent 0) 0 0 / 100% 100% no-repeat;
    display: block;
}

#circle.penguin-3d #circle-icon::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 80px;
    height: 20px;
    background: 
        radial-gradient(ellipse at center, #ffa500 40%, transparent 70%) 0 0 / 30px 20px no-repeat,
        radial-gradient(ellipse at center, #ffa500 40%, transparent 70%) 50px 0 / 30px 20px no-repeat;
}

/* 3D Monkey Styling */
#circle.monkey-3d {
    width: 140px;
    height: 130px;
    border-radius: 50% 50% 45% 45%;
    background: #8b4513 !important;
    box-shadow: 
        0 12px 0 #5d2906,
        0 20px 25px rgba(0,0,0,0.3),
        inset -5px -5px 15px rgba(0,0,0,0.2);
    position: relative;
    transform: rotateX(10deg);
}

#circle.monkey-3d::before, #circle.monkey-3d::after {
    content: "";
    position: absolute;
    width: 45px;
    height: 45px;
    background: #8b4513;
    border-radius: 50%;
    top: 20px;
    z-index: -1;
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2);
}
#circle.monkey-3d::before { left: -20px; }
#circle.monkey-3d::after { right: -20px; }

#circle.monkey-3d #circle-icon {
    position: absolute;
    width: 100%; height: 100%;
    background: 
        /* Face Mask */
        radial-gradient(ellipse at 50% 65%, #f5deb3 45%, transparent 46%),
        /* Eyes */
        radial-gradient(circle at 45px 55%, #000 5px, transparent 6px),
        radial-gradient(circle at 95px 55%, #000 5px, transparent 6px);
    display: block;
}

#circle.monkey-3d #circle-icon::after {
    content: "";
    position: absolute;
    bottom: 35px;
    left: 55px;
    width: 30px;
    height: 10px;
    border-bottom: 3px solid #5d2906;
    border-radius: 50%;
}

/* 3D Banana Styling */
#circle.banana-3d {
    width: 180px;
    height: 60px;
    border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
    background: #ffe135 !important;
    box-shadow: 
        0 8px 0 #ffcc00,
        0 15px 25px rgba(0,0,0,0.2),
        inset -10px -10px 20px rgba(0,0,0,0.1);
    position: relative;
    transform: rotateX(15deg) rotateZ(-20deg);
}

#circle.banana-3d::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -10px;
    width: 25px;
    height: 40px;
    background: linear-gradient(to bottom, #4b2c20, #8b4513);
    border-radius: 5px;
    transform: rotate(-30deg);
    box-shadow: 0 4px 5px rgba(0,0,0,0.3);
}

#circle.banana-3d::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: 0;
    width: 20px;
    height: 20px;
    background: #000;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    opacity: 0.3;
}

#circle.banana-3d #circle-icon {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        /* Ripening Spots */
        radial-gradient(circle at 40% 40%, rgba(139, 69, 19, 0.1) 2px, transparent 3px),
        radial-gradient(circle at 70% 60%, rgba(139, 69, 19, 0.1) 3px, transparent 4px),
        radial-gradient(circle at 20% 50%, rgba(139, 69, 19, 0.1) 1px, transparent 2px);
    display: block;
}

/* 3D Egg Styling */
#circle.egg-3d {
    width: 120px;
    height: 160px;
    border-radius: 50% 50% 50% 50% / 65% 65% 35% 35% !important;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #f7f7f7 40%, #e0e0e0 100%) !important;
    border: 1px solid #dcdcdc;
    box-shadow: 
        0 15px 30px rgba(0,0,0,0.15),
        inset -10px -20px 40px rgba(0,0,0,0.03);
    position: relative;
    transform: rotateX(10deg);
}

#circle.egg-3d::before {
    content: "";
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30px;
    height: 20px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    filter: blur(8px);
    pointer-events: none;
}

#circle.egg-3d #circle-icon {
    display: none !important;
}

/* Aura Effects */
#aura-effect {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    pointer-events: none !important;
    z-index: -1;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#aura-effect.active {
    display: block;
}

/* Wind Aura (Tornado) */
#aura-effect.aura-wind {
    background: 
        conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(200,200,200,0.6) 10deg, transparent 20deg),
        conic-gradient(from 90deg at 50% 50%, transparent 0deg, rgba(255,255,255,0.5) 15deg, transparent 30deg),
        conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(150,150,150,0.6) 10deg, transparent 20deg),
        conic-gradient(from 270deg at 50% 50%, transparent 0deg, rgba(255,255,255,0.4) 15deg, transparent 30deg);
    filter: blur(5px);
    animation: wind-tornado 0.1s linear infinite;
    opacity: 0.9;
}
@keyframes wind-tornado { from { transform: translate(-50%, -50%) rotate(0deg) scale(1.1); } to { transform: translate(-50%, -50%) rotate(360deg) scale(1.4); } }

/* Fire Aura (Realistic Flames) */
#aura-effect.aura-fire {
    background: radial-gradient(circle at 50% 50%, transparent 35%, #ff4500 50%, #ff8c00 65%, transparent 80%);
    filter: blur(12px);
    animation: fire-surge 0.1s ease-in-out infinite alternate;
}
#aura-effect.aura-fire::before {
    content: "";
    position: absolute;
    top: -40px; left: -40px; right: -40px; bottom: -40px;
    background: repeating-conic-gradient(from 0deg, #ff4500 0deg 15deg, transparent 15deg 30deg);
    -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%);
    mask: radial-gradient(circle, #000 30%, transparent 70%);
    animation: fire-rotate 0.4s linear infinite;
}
@keyframes fire-surge { from { transform: translate(-50%, -50%) scale(1); opacity: 0.8; } to { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } }
@keyframes fire-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Earth Aura (Realistic Orbiting Rocks) */
#aura-effect.aura-earth {
    background: none;
}
#aura-effect.aura-earth::before {
    content: "🪨";
    position: absolute;
    font-size: 2.5rem;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.6));
    animation: earth-orbit 3.5s linear infinite;
}
#aura-effect.aura-earth::after {
    content: "🪨";
    position: absolute;
    font-size: 1.8rem;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.6));
    animation: earth-orbit 2.5s linear infinite reverse;
}
@keyframes earth-orbit {
    0% { transform: rotate(0deg) translateX(120px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

/* Water Aura (Flowing Wave) */
#aura-effect.aura-water {
    background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(30,144,255,0.7) 65%);
    overflow: hidden;
}
#aura-effect.aura-water::before {
    content: "";
    position: absolute;
    top: 40%; left: -60%; width: 220%; height: 220%;
    background: rgba(255,255,255,0.3);
    border-radius: 38%;
    animation: water-wave 3s linear infinite;
}
@keyframes water-wave { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Thunder Aura (High-Voltage) */
#aura-effect.aura-thunder {
    background: radial-gradient(circle, transparent 50%, rgba(255,255,255,0.9) 55%, #ffff00 65%, transparent 80%);
    animation: thunder-crack 0.8s steps(1) infinite;
    filter: blur(4px);
}
@keyframes thunder-crack {
    0%, 70% { opacity: 0; }
    71%, 85% { opacity: 1; filter: drop-shadow(0 0 50px #fff) brightness(3); }
    86%, 100% { opacity: 0; }
}

/* 3D Earth Styling */
#circle.earth-3d {
    width: 140px;
    height: 140px;
    border-radius: 50% !important;
    background: radial-gradient(circle at 30% 30%, #4a7c2c, #2d4a1e 70%, #1a2a11) !important;
    box-shadow: 
        0 15px 30px rgba(0,0,0,0.4),
        inset -10px -10px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

#circle.earth-3d::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, #8b4513 10px, transparent 20px),
        radial-gradient(circle at 40% 50%, #8b4513 15px, transparent 25px),
        radial-gradient(circle at 80% 30%, #8b4513 12px, transparent 22px),
        radial-gradient(circle at 20% 80%, #deb887 8px, transparent 15px);
    opacity: 0.4;
    animation: earth-spin 15s linear infinite;
}
@keyframes earth-spin { from { left: 0; } to { left: -100%; } }

#circle.earth-3d #circle-icon {
    display: none !important;
}

/* 3D Mars Styling */
#circle.mars-3d {
    width: 130px;
    height: 130px;
    border-radius: 50% !important;
    background: radial-gradient(circle at 30% 30%, #e74c3c, #c0392b 70%, #922b21) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), inset -5px -5px 20px rgba(0,0,0,0.5);
    position: relative;
}

/* 3D Moon Styling */
#circle.moon-3d {
    width: 120px;
    height: 120px;
    border-radius: 50% !important;
    background: radial-gradient(circle at 30% 30%, #bdc3c7, #95a5a6 70%, #7f8c8d) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3), inset -5px -5px 15px rgba(0,0,0,0.4);
    position: relative;
}
#circle.moon-3d::before {
    content: "";
    position: absolute;
    width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0,0,0,0.1) 8px, transparent 10px),
        radial-gradient(circle at 60% 70%, rgba(0,0,0,0.1) 12px, transparent 14px),
        radial-gradient(circle at 80% 20%, rgba(0,0,0,0.1) 6px, transparent 8px) !important;
    border-radius: 50%;
}

/* 3D Sun Styling */
#circle.sun-3d {
    width: 150px;
    height: 150px;
    border-radius: 50% !important;
    background: radial-gradient(circle at 50% 50%, #fff 0%, #f1c40f 40%, #e67e22 70%, #d35400 100%) !important;
    box-shadow: 0 0 50px #f1c40f, inset 0 0 20px #fff;
    animation: sun-pulse 2s infinite alternate;
}
@keyframes sun-pulse { from { transform: scale(1); box-shadow: 0 0 40px #f1c40f; } to { transform: scale(1.05); box-shadow: 0 0 60px #e67e22; } }

/* 3D Book Styling */
#circle.book-3d {
    width: 130px;
    height: 170px;
    border-radius: 5px 15px 15px 5px !important;
    background: #4b2c20 !important;
    border-left: 12px solid #3a1d12;
    box-shadow: 
        5px 10px 20px rgba(0,0,0,0.4),
        inset 2px 0 5px rgba(255,255,255,0.1);
    position: relative;
    transform: rotateY(-20deg) rotateX(10deg);
}

#circle.book-3d::before {
    content: "";
    position: absolute;
    top: 5px; right: -5px; bottom: 5px;
    width: 10px;
    background: repeating-linear-gradient(to bottom, #fff, #fff 1px, #ddd 1px, #ddd 2px);
    border-radius: 0 5px 5px 0;
}

#circle.book-3d #circle-icon {
    font-size: 1.2rem;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    z-index: 2;
}

/* 3D Bacon Styling */
#circle.bacon-3d {
    width: 200px;
    height: 60px;
    border-radius: 10px !important;
    background: linear-gradient(to right, #8b0000 20%, #fff 25%, #8b0000 45%, #fff 50%, #8b0000 75%, #fff 80%, #8b0000 100%) !important;
    box-shadow: 
        0 8px 15px rgba(0,0,0,0.3),
        inset 0 2px 10px rgba(255,255,255,0.2);
    position: relative;
    animation: bacon-sizzle 0.5s infinite alternate;
}
@keyframes bacon-sizzle {
    from { transform: rotateZ(-5deg) scaleY(1); }
    to { transform: rotateZ(-5deg) scaleY(0.95) translateY(2px); }
}

#circle.bacon-3d #circle-icon {
    display: none !important;
}

@keyframes blink {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

#open-skins-btn:hover, #open-board-btn:hover {
    transform: scale(1.05);
}

#boardgame-entry {
    margin-left: 10px;
}

#open-board-btn {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s;
}

.board-content {
    max-width: 800px !important;
    background: #2c3e50 !important;
    color: white !important;
}

#board-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(5, 80px);
    grid-template-rows: repeat(5, 80px);
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 15px;
    position: relative;
}

.board-space {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
    border: 2px solid rgba(255,255,255,0.1);
    background: #34495e;
}

.space-reward { background: linear-gradient(135deg, #3498db, #2980b9); }
.space-ambush { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.space-hazard { background: linear-gradient(135deg, #8e44ad, #2c3e50); }
.space-mystery { background: linear-gradient(135deg, #f1c40f, #f39c12); border: 2px dashed white; }
.space-start { background: linear-gradient(135deg, #2ecc71, #27ae60); border: 2px solid white; }

#player-token {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    position: absolute;
    z-index: 10;
    box-shadow: 0 0 15px rgba(255,255,255,0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

#dice-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#dice {
    width: 80px;
    height: 80px;
    background: white;
    color: #333;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.dice-rolling {
    animation: roll-anim 0.2s infinite;
}

@keyframes roll-anim {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(0.9); }
    100% { transform: rotate(360deg) scale(1); }
}

#roll-btn {
    padding: 12px 30px;
    border-radius: 12px;
    border: none;
    background: #2ecc71;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
}

#roll-btn:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
}

#battle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 2500;
    pointer-events: none;
}

#battle-arena {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

#hp-container {
    width: 300px;
    height: 30px;
    background: #333;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    border: 2px solid #000;
}

#hp-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #00ff00, #32cd32);
    transition: width 0.1s ease-out;
}

#hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px #000;
}

#battle-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff4b2b;
}

.floating-text {
    position: absolute;
    color: #a8e063;
    font-weight: bold;
    font-size: 1.5rem;
    pointer-events: none;
    animation: float-up 0.8s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 3000;
}

@keyframes float-up {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(1.2); opacity: 0; }
}

#circle.hit {
    animation: shake 0.1s linear, flash-red 0.1s linear;
}

@keyframes shake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(5px, 5px); }
    50% { transform: translate(-5px, -5px); }
    75% { transform: translate(5px, -5px); }
    100% { transform: translate(0, 0); }
}

@keyframes flash-red {
    from { filter: brightness(1) sepia(1) hue-rotate(-50deg) saturate(5); }
    to { filter: brightness(1); }
}

#skin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    color: #333;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

#close-skins-btn, #close-board-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
}

#shop-switch-btn {
    padding: 8px 20px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

#shop-switch-btn:hover {
    transform: scale(1.05);
}

.tab-pane {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.tab-pane.hidden {
    display: none !important;
}

.skin-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 15px;
    transition: transform 0.2s;
}

.skin-item:hover { transform: translateY(-5px); }
.skin-item.owned { border-color: #667eea; }
.skin-item.equipped { background: #f0f4ff; border-color: #764ba2; }

.skin-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.skin-item button {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.buy-btn { background: #4caf50; color: white; }
.equip-btn { background: #2196f3; color: white; }
.equipped-label { color: #764ba2; font-weight: bold; font-size: 0.9rem; }
.skin-cost { font-weight: bold; color: #333; font-size: 0.8rem; }

#rebirth-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #6e8efb;
    background: white;
    padding: 5px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    align-self: flex-start;
}

#counter {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    background: white;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#cheat-bar {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #6e8efb;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#upgrade-container {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    max-height: 90vh;
    overflow-y: auto;
    padding-right: 15px;
}

#rebirth-row {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}

#pause-btn {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #bdc3c7, #2c3e50);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s, opacity 0.3s;
    width: auto;
    flex-shrink: 0;
}

#pause-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #95a5a6, #34495e);
}

#pause-btn.paused {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

#upgrade-btn, #upgrade-btn-2, #upgrade-btn-3, #upgrade-btn-4, #upgrade-btn-5, #upgrade-btn-6, #upgrade-btn-7, #upgrade-btn-8, #upgrade-btn-9, 
[id^="upgrade-btn-"], #auto-btn-1, #auto-btn-2, #auto-btn-3, #auto-btn-4, #auto-btn-5, #auto-btn-6, #auto-btn-7, #auto-btn-8, #auto-btn-9, [id^="auto-btn-"], #rebirth-btn {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s, opacity 0.3s;
    width: 240px;
    flex-shrink: 0;
}

#rebirth-btn {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    margin-top: 20px;
    border: 2px solid #fff;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px #ffd700; }
    to { box-shadow: 0 0 20px #ffa500; }
}

#upgrade-container button:disabled { opacity: 0.5; cursor: not-allowed; background: #ccc; }
#upgrade-container button:not(:disabled):hover { transform: scale(1.05); background: linear-gradient(135deg, #f093fb, #f5576c); }

.hidden, #skin-modal.hidden, #boardgame-modal.hidden, #battle-overlay.hidden, #pause-overlay.hidden {
    display: none !important;
}

.container { perspective: 1000px; }
#circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

#circle.in-battle {
    z-index: 3000;
    box-shadow: 0 0 40px #fff, 0 0 80px rgba(255, 255, 255, 0.6);
    border: 4px solid #fff;
    animation: battle-pulse 0.8s infinite alternate;
}

@keyframes battle-pulse {
    from { transform: scale(1); filter: brightness(1); }
    to { transform: scale(1.1); filter: brightness(1.3); }
}
#circle-icon { font-size: 5rem; pointer-events: none; user-select: none; }
#circle:hover { transform: scale(1.05); box-shadow: 0 12px 24px rgba(0,0,0,0.25); }
#circle:active { transform: scale(0.9); }
.pop { animation: pop-animation 0.3s ease-out; }
@keyframes pop-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ============================================
   PAUSE OVERLAY & NEWTON'S CRADLE STYLING
   ============================================ */

#pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#pause-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.pause-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 480px;
    width: 90%;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transform: translateY(20px);
    transition: transform 0.3s ease-out;
}

#pause-overlay:not(.hidden) .pause-content {
    transform: translateY(0);
}

.pause-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 5px;
    margin: 0 0 40px 0;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(230, 126, 34, 0.2);
}

/* Newton's Cradle UI */
.newtons-cradle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.cradle-bar {
    width: 250px;
    height: 12px;
    background: linear-gradient(90deg, #555 0%, #aaa 15%, #eee 50%, #aaa 85%, #555 100%);
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    z-index: 5;
    position: relative;
}

.cradle-strings {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 200px;
    height: 180px;
    margin-top: -2px; /* slight overlap with bar for connection look */
}

.cradle-ball-container {
    width: 40px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform-origin: top center;
}

.cradle-string {
    width: 1px;
    height: 140px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.15));
    box-shadow: 0 0 1px rgba(0,0,0,0.5);
}

.cradle-ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #dcdde1 30%, #7f8c8d 70%, #2c3e50 100%);
    box-shadow: inset -3px -3px 8px rgba(0,0,0,0.6),
                0 6px 12px rgba(0,0,0,0.3);
}

/* High Fidelity Physics Swing Keyframes */
.cradle-ball-container.ball-1 {
    animation: swing-left 1.4s infinite;
}

.cradle-ball-container.ball-5 {
    animation: swing-right 1.4s infinite;
}

@keyframes swing-left {
    0% {
        transform: rotate(-35deg);
        animation-timing-function: ease-in;
    }
    25% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(0deg);
        animation-timing-function: ease-out;
    }
    100% {
        transform: rotate(-35deg);
    }
}

@keyframes swing-right {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(0deg);
        animation-timing-function: ease-out;
    }
    50% {
        transform: rotate(35deg);
        animation-timing-function: ease-in;
    }
    75% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

#overlay-resume-btn {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border: none;
    padding: 14px 40px;
    border-radius: 14px;
    box-shadow: 0 6px 15px rgba(230, 126, 34, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#overlay-resume-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(230, 126, 34, 0.4);
}

#overlay-resume-btn:active {
    transform: scale(0.95);
}

.pause-clock {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    color: #e67e22;
    text-shadow: 0 0 12px rgba(230, 126, 34, 0.5);
    margin-bottom: 30px;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 24px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-block;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
    min-width: 220px;
}

.pause-options {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, border-color 0.2s;
}

.switch-container:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.switch-container input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #e67e22;
}

.switch-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    body {
        padding-top: 80px;
        box-sizing: border-box;
    }

    #loading-text-container {
        font-size: 3rem;
        flex-direction: column;
        gap: 10px;
    }

    #ui-left {
        top: 80px;
        left: 10px;
        right: 10px;
        align-items: center;
    }

    #counter {
        font-size: 1.5rem;
        padding: 8px 15px;
        width: fit-content;
    }

    #rebirth-count {
        font-size: 1rem;
        padding: 4px 10px;
    }

    #ui-bottom-left {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    #open-skins-btn, #open-wallpapers-btn, #open-sounds-btn, #open-auras-btn, #open-board-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
        width: calc(50% - 10px);
        min-width: 120px;
    }

    #boardgame-entry {
        margin-left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #open-board-btn {
        width: 100%;
    }

    #upgrade-container {
        top: auto;
        bottom: 140px;
        right: 10px;
        left: 10px;
        max-height: 30vh;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 10px;
        justify-content: flex-start;
        align-items: flex-end;
    }

    #upgrade-btn, #upgrade-btn-2, #upgrade-btn-3, #upgrade-btn-4, #upgrade-btn-5, #upgrade-btn-6, #upgrade-btn-7, #upgrade-btn-8, #upgrade-btn-9, 
    [id^="upgrade-btn-"], #auto-btn-1, #auto-btn-2, #auto-btn-3, #auto-btn-4, #auto-btn-5, #auto-btn-6, #auto-btn-7, #auto-btn-8, #auto-btn-9, [id^="auto-btn-"], #rebirth-btn {
        width: 160px;
        font-size: 0.8rem;
        padding: 10px;
        flex-shrink: 0;
    }

    #rebirth-row {
        position: fixed;
        top: 80px;
        right: 10px;
        width: auto;
    }

    #pause-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
        margin: 10px;
    }

    .tab-pane {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    #game-board {
        grid-template-columns: repeat(5, 50px);
        grid-template-rows: repeat(5, 50px);
        gap: 5px;
        padding: 10px;
    }

    .board-space {
        width: 50px;
        height: 50px;
        font-size: 0.6rem;
    }

    #player-token {
        width: 25px;
        height: 25px;
    }

    #dice {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    #battle-arena {
        width: 90%;
        padding: 15px;
    }

    #hp-container {
        width: 100%;
    }

    .pause-clock {
        font-size: 1.8rem;
        min-width: 160px;
    }

    .cradle-bar {
        width: 180px;
    }

    .cradle-ball-container {
        width: 30px;
    }

    .cradle-ball {
        width: 30px;
        height: 30px;
    }
}
