* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

/* Maintenance Styles */
#maintenance-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #572364;
    color: #000;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    padding: 10px;
    font-weight: bold;
    z-index: 500;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse-banner 2s infinite;
}

@keyframes pulse-banner {
    0% {
        background-color: #ff9800;
    }

    50% {
        background-color: #ffc107;
    }

    100% {
        background-color: #ff9800;
    }
}

.maintenance-disabled {
    pointer-events: none !important;
    opacity: 0.5 !important;
    filter: grayscale(100%) !important;
    position: relative;
}

.maintenance-disabled::after {
    content: "MANTENIMIENTO";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    margin: 0 auto;
}

body {
    font-family: 'Courier New', monospace;
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    transition: background-image 2s ease-in-out;
}

/* Default/Home (Clicker) - Orange */
body.home-active {
    background-image: linear-gradient(-45deg, #1a0b00, #813400, #cf5300, #7e3000);
}

/* Roulette - Red */
body.roulette-active {
    background-image: linear-gradient(-45deg, #1a0000, #4d0000, #800000, #2e0000);
}

/* Roulette Win - Green */
body.roulette-active.roulette-win {
    background-image: linear-gradient(-45deg, #001a00, #004d00, #008000, #002e00) !important;
}

/* Chat - Blue */
body.chat-active {
    background-image: linear-gradient(-45deg, #000b1a, #001f4d, #003380, #00122e);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 3px solid #ff6b00;

    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
    animation: headerGlow 2s ease-in-out infinite;
    position: relative;
}

@keyframes headerGlow {

    0%,

    100% {
        box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
        border-color: #ff6b00;
    }

    50% {
        box-shadow: 0 8px 30px rgba(255, 107, 0, 0.6), 0 0 40px rgba(255, 107, 0, 0.2);
        border-color: #ffaa00;
    }
}

header h1 {
    font-size: 3em;
    margin: 0;
    color: #ff6b00;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.5);
}

header h3 {
    margin: 0.5em 0 1em;
    color: #888;
}

header {
    position: relative;
}


/* Options link in header */
.options-link {
    position: absolute;
    top: 20px;
    right: 20px;
    text-decoration: none;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 107, 0, 0.1);
    border: 2px solid rgba(255, 107, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.options-link svg {
    width: 24px;
    height: 24px;
    color: #ff6b00;
}

.options-link:hover {
    background: rgba(255, 107, 0, 0.3);
    border-color: #ff6b00;
    transform: rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.5);
}

@media (max-width: 768px) {
    .options-link {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .options-link svg {
        width: 20px;
        height: 20px;
    }
}

h1 {
    font-size: 2.5em;
    text-align: center;
    color: #ff6b00;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
    margin-bottom: 20px;
    letter-spacing: 3px;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 107, 0, 0.8), 0 0 30px rgba(255, 170, 0, 0.4);
        transform: scale(1.02);
    }
}

.stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a1a1a;
    padding: 15px 30px;
    border-radius: 6px;
    border: 2px solid #444;
    flex: 1;
}

.stat-label {
    font-size: 0.9em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8em;
    color: #ff6b00;
    font-weight: bold;
    animation: statPulse 2s ease-in-out infinite;
}

@keyframes statPulse {

    0%,
    100% {
        color: #ff6b00;
        text-shadow: 0 0 5px rgba(255, 107, 0, 0.3);
    }

    50% {
        color: #ffaa00;
        text-shadow: 0 0 15px rgba(255, 170, 0, 0.6);
    }
}

main {
    display: grid;
    gap: 30px;
}

.clicker-section {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 3px solid #ff6b00;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(255, 106, 0, 0.788);
    animation: sectionGlow 3s ease-in-out infinite;
}

@keyframes sectionGlow {

    0%,
    100% {
        box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
    }

    50% {
        box-shadow: 0 8px 35px rgba(255, 107, 0, 0.5), 0 0 50px rgba(255, 107, 0, 0.2);
    }
}

.click-button {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border: 5px solid #ffaa00;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.5);
    margin: 0 auto;
    animation: buttonPulse 2s ease-in-out infinite;
    position: relative;
}

@keyframes buttonPulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(255, 107, 0, 0.5);
        border-color: #ffaa00;
    }

    50% {
        box-shadow: 0 10px 40px rgba(255, 107, 0, 0.8), 0 0 60px rgba(255, 170, 0, 0.4);
        border-color: #ffd700;
    }
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

opacity: 1;
}

100% {
    transform: scale(1.3);
    opacity: 0;
}
}

.click-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(255, 107, 0, 0.9),
        0 0 80px rgba(255, 170, 0, 0.5);
    animation: none;
}

.click-button:active {
    transform: scale(0.9);
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.6);
}

.gear-icon {
    font-size: 4em;
    animation: rotate 2s linear infinite, gearPulse 1s ease-in-out infinite;

    filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.5));
}

@keyframes rotate {
    from {
        transform: rotate(0deg) scale(1);
    }

    to {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes gearPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(255, 170, 0, 0.8));
    }
}

.click-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #1a1a1a;
    letter-spacing: 2px;
}

.click-value {
    margin-top: 20px;
    font-size: 1.3em;
    color: #ffaa00;
}

.upgrades-section {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 3px solid #ff6b00;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
    animation: sectionGlow 3s ease-in-out infinite 0.5s;
}

.upgrades-section h2 {
    color: #ff6b00;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
    letter-spacing: 2px;
}

.upgrades-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 1200px) {
    .upgrades-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .upgrades-grid {
        grid-template-columns: 1fr;
    }
}

.upgrade-card {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 6px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-card:hover:not(.disabled) {
    border-color: #ff6b00;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.6), 0 0 40px rgba(255, 107, 0, 0.3);
    background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%);
    animation: cardShimmer 1.5s ease-in-out infinite;
}

@keyframes cardShimmer {

    0%,
    100% {
        box-shadow: 0 8px 25px rgba(255, 107, 0, 0.6), 0 0 40px rgba(255, 107, 0, 0.3);
    }

    50% {
        box-shadow: 0 8px 30px rgba(255, 107, 0, 0.8), 0 0 50px rgba(255, 170, 0, 0.4);
    }
}

.upgrade-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.upgrade-icon {
    font-size: 2em;
    display: inline-block;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.upgrade-count {
    background: #ff6b00;
    color: #1a1a1a;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9em;
}

.upgrade-name {
    font-size: 1.2em;
    color: #ff6b00;
    margin-bottom: 8px;
    font-weight: bold;
}

.upgrade-description {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 12px;
    line-height: 1.4;
}

.upgrade-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.upgrade-production {
    color: #ffaa00;
    font-size: 0.9em;
}

.upgrade-cost {
    background: #2a2a2a;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: bold;
    color: #ff6b00;
}

/* ========== RANKING SIDEBAR ========== */
.ranking-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border: 3px solid #ffaa00;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 20px 10px;
    cursor: pointer;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    transition: all 0.3s ease;
    box-shadow: -5px 0 15px rgba(255, 107, 0, 0.5);
    animation: togglePulse 2s ease-in-out infinite;
}

@keyframes togglePulse {

    0%,
    100% {
        box-shadow: -5px 0 15px rgba(255, 107, 0, 0.5);
    }

    50% {
        box-shadow: -5px 0 25px rgba(255, 107, 0, 0.8);
    }
}

.ranking-toggle:hover {
    transform: translateY(-50%) translateX(-5px);
    box-shadow: -8px 0 25px rgba(255, 107, 0, 0.8);
}

.toggle-icon {
    font-size: 1.5em;
    color: #1a1a1a;
    font-weight: bold;
    display: block;
    transition: transform 0.3s ease;
}

.ranking-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.ranking-panel {
    position: fixed;
    right: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    height: 100vh;
    background: #000;
    border-left: 3px solid #ff6b00;
    border-left: 3px solid #ff6b00;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: right 0.4s ease;
    transition: right 0.4s ease;
    overflow-y: auto;
    animation: panelGlow 3s ease-in-out infinite;
}

@keyframes panelGlow {

    0%,
    100% {
        border-left-color: #ff6b00;
    }

    50% {
        border-left-color: #ffaa00;
    }
}

.ranking-panel.open {
    right: 0;
}

.ranking-header {
    background: linear-gradient(135deg, #1f1f1f 0%, #1a1a1a 100%);
    padding: 20px;
    border-bottom: 2px solid #ff6b00;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.ranking-header h2 {
    color: #ff6b00;
    font-size: 1.5em;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.close-ranking {
    background: transparent;
    border: 2px solid #ff6b00;
    color: #ff6b00;
    font-size: 1.5em;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-ranking:hover {
    background: #ff6b00;
    color: #1a1a1a;
    transform: rotate(90deg);
}

.ranking-content {
    padding: 20px;
}

.ranking-loading {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 1.1em;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    border-color: #ff6b00;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

.ranking-item.online {
    border-color: #00ff00;
    /* bright green for online */
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}


.ranking-position {
    font-size: 2em;
    font-weight: bold;
    color: #ff6b00;
    min-width: 40px;
    text-align: center;
}

.ranking-item:nth-child(1) .ranking-position {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.ranking-item:nth-child(2) .ranking-position {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.8);
}

.ranking-item:nth-child(3) .ranking-position {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.8);
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-size: 1.2em;
    color: #ff6b00;
    font-weight: bold;
    margin-bottom: 5px;
}

.ranking-item.current-player .ranking-name {
    color: #00ff00;
}

@keyframes blinkBorderRed {

    0%,
    100% {
        border-color: #444;
        box-shadow: none;
    }

    50% {
        border-color: #ff0000;
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    }
}

.ranking-item.betting {
    animation: blinkBorderRed 1s infinite !important;
    border-color: #444;
    /* Ensure static state is also not green if animation delays */
}

.ranking-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: #888;
}

.ranking-stat {
    display: flex;
    flex-direction: column;
}

.ranking-stat-label {
    font-size: 0.8em;
    text-transform: uppercase;
}

.ranking-stat-value {
    color: #ffaa00;
    font-weight: bold;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    .stats {
        flex-direction: column;
    }

    .click-button {
        width: 160px;
        height: 160px;
    }

    .ranking-panel {
        width: 100%;
        right: -100%;
    }

    .ranking-toggle {
        padding: 15px 8px;
    }

    .toggle-icon {
        font-size: 1.2em;
    }
}

@keyframes glowOrange {
    0% {
        box-shadow: 0 0 5px #ffaa00, inset 0 0 5px #ffaa00;
        border-color: #ffaa00;
    }

    50% {
        box-shadow: 0 0 20px #ffaa00, inset 0 0 10px #ffaa00;
        border-color: #ffaa00;
    }

    100% {
        box-shadow: none;
        border-color: rgba(0, 255, 255, 0.3);
    }
}

.ranking-item.glow {
    animation: glowOrange 1s ease-out infinite;
    z-index: 1002;
}

/* Chat UI */
.chat-toggle {
    position: fixed;
    right: 0;
    top: 65%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #0000FF 0%, #00FFFF 100%);
    border: 3px solid #ffaa00;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 20px 10px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: -5px 0 15px rgba(255, 107, 0, 0.5);
    animation: togglePulse 2s ease-in-out infinite;

}


.notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid #2196f3;
}

.chat-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100%;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid #333;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    /* Above ranking */
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.chat-panel.open {
    right: 0;
}

#view-chat .chat-header {
    padding: 1rem;
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 15px;
}

#view-chat .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#view-chat .chat-msg {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    word-wrap: break-word;
}

#view-chat .chat-msg.admin {
    border-left: 3px solid #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

#view-chat .chat-sender {
    font-weight: bold;
    color: #aaa;
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
}

#view-chat .chat-sender.admin {
    color: #ff4444;
}

#view-chat .chat-sender.self {
    color: #2196f3;
}

#view-chat .chat-text {
    color: #eee;
}

#view-chat .chat-input-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 0.5rem;
    border-radius: 8px;
}

#view-chat #chatInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
}

#view-chat #chatSend {
    background: #2196f3;
    border: none;
    color: white;
    padding: 0 1rem;
    border-radius: 4px;
    cursor: pointer;
}

#view-chat #chatSend:hover {
    background: #1976d2;
}

/* ========== ROULETTE SIDEBAR ========== */
.betting-toggle {
    position: fixed;
    right: 0;
    top: 35%;
    /* Above ranking toggle */
    transform: translateY(-50%);
    background: linear-gradient(135deg, #e60000 0%, #990000 100%);
    border: 3px solid #ff4444;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 20px 10px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: -5px 0 15px rgba(255, 0, 0, 0.5);
    animation: togglePulseRed 2s ease-in-out infinite;
}

@keyframes togglePulseRed {

    0%,
    100% {
        box-shadow: -5px 0 15px rgba(255, 0, 0, 0.5);
    }

    50% {
        box-shadow: -5px 0 25px rgba(255, 0, 0, 0.8);
    }
}

.betting-toggle:hover {
    transform: translateY(-50%) translateX(-5px);
    box-shadow: -8px 0 25px rgba(255, 0, 0, 0.8);
}

.betting-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #1a0505 0%, #0f0f0f 100%);
    border-left: 3px solid #ff0000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: right 0.4s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.betting-panel.open {
    right: 0;
}

.betting-header {
    background: linear-gradient(135deg, #2a0a0a 0%, #1a0505 100%);
    padding: 20px;
    border-bottom: 2px solid #ff0000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.betting-header h2 {
    color: #ff4444;
    font-size: 1.5em;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.betting-money {
    color: #ffaa00;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.3);
}

.close-betting {
    background: transparent;
    border: 2px solid #ff4444;
    color: #ff4444;
    font-size: 1.5em;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-betting:hover {
    background: #ff4444;
    color: #fff;
    transform: rotate(90deg);
}

.betting-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ROULETTE WHEEL */
.roulette-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 50%;
    border: 10px solid #4a0000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.8);
    background: #000;
    overflow: hidden;
}

.roulette-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#008000 0deg 9.7deg,
            /* 0 */
            #ff0000 9.7deg 19.4deg,
            /* 32 */
            #000000 19.4deg 29.1deg,
            /* 15 */
            #ff0000 29.1deg 38.8deg,
            /* 19 */
            #000000 38.8deg 48.5deg,
            /* 4 */
            #ff0000 48.5deg 58.2deg,
            /* 21 */
            #000000 58.2deg 67.9deg,
            /* 2 */
            #ff0000 67.9deg 77.6deg,
            /* 25 */
            #000000 77.6deg 87.3deg,
            /* 17 */
            #ff0000 87.3deg 97deg,
            /* 34 */
            #000000 97deg 106.7deg,
            /* 6 */
            #ff0000 106.7deg 116.4deg,
            /* 27 */
            #000000 116.4deg 126.1deg,
            /* 13 */
            #ff0000 126.1deg 135.8deg,
            /* 36 */
            #000000 135.8deg 145.5deg,
            /* 11 */
            #ff0000 145.5deg 155.2deg,
            /* 30 */
            #000000 155.2deg 164.9deg,
            /* 8 */
            #ff0000 164.9deg 174.6deg,
            /* 23 */
            #000000 174.6deg 184.3deg,
            /* 10 */
            #ff0000 184.3deg 194deg,
            /* 5 */
            #000000 194deg 203.7deg,
            /* 24 */
            #ff0000 203.7deg 213.4deg,
            /* 16 */
            #000000 213.4deg 223.1deg,
            /* 33 */
            #ff0000 223.1deg 232.8deg,
            /* 1 */
            #000000 232.8deg 242.5deg,
            /* 20 */
            #ff0000 242.5deg 252.2deg,
            /* 14 */
            #000000 252.2deg 261.9deg,
            /* 31 */
            #ff0000 261.9deg 271.6deg,
            /* 9 */
            #000000 271.6deg 281.3deg,
            /* 22 */
            #ff0000 281.3deg 291deg,
            /* 18 */
            #000000 291deg 300.7deg,
            /* 29 */
            #ff0000 300.7deg 310.4deg,
            /* 7 */
            #000000 310.4deg 320.1deg,
            /* 28 */
            #ff0000 320.1deg 329.8deg,
            /* 12 */
            #000000 329.8deg 339.5deg,
            /* 35 */
            #ff0000 339.5deg 349.2deg,
            /* 3 */
            #000000 349.2deg 360deg
            /* 26 */
        );
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
}

.roulette-wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.roulette-ball {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -135px);
    /* Start position */
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.roulette-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px #000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 20;
}

.roulette-result.show {
    opacity: 1;
}

/* BETTING CONTROLS */
.betting-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

.bet-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bet-input-group input {
    flex: 1;
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

#btnMaxBet {
    padding: 8px 12px;
    background: #ffaa00;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #000;
}

.bet-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bet-colors,
.bet-parity {
    display: flex;
    gap: 10px;
}

.bet-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
    font-size: 0.9em;
}

.bet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.bet-btn.selected {
    outline: 3px solid #ffaa00;
    box-shadow: 0 0 15px #ffaa00;
}

.bet-btn.red {
    background: #d00;
}

.bet-btn.black {
    background: #222;
}

.bet-btn[data-type="parity"] {
    background: #444;
}

.bet-numbers-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 6 columns for 36 numbers */
    gap: 5px;
}

.bet-number {
    padding: 8px 0;
    text-align: center;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
}

.bet-number.red {
    background: #b00;
}

.bet-number.black {
    background: #222;
}

.bet-number.green {
    background: #008000;
    grid-column: span 6;
}

/* 0 spans all */

.bet-number:hover {
    filter: brightness(1.2);
}

.bet-number.selected {
    outline: 2px solid #ffaa00;
    z-index: 1;
}

.spin-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to bottom, #ffaa00, #ff6b00);
    border: none;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    font-size: 1.2em;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 0 #cc5500;
    transition: all 0.1s;
}

.spin-button:active {
    transform: translateY(4px);
    box-shadow: none;
}

.spin-button:disabled {
    background: #555;
    box-shadow: none;
    color: #888;
    cursor: not-allowed;
}

/* HISTORY */
.betting-history {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
}

.betting-history h3 {
    margin-bottom: 10px;
    font-size: 1em;
    color: #888;
    text-align: center;
}

#bettingHistoryList {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    font-size: 0.85em;
}

.history-item.win {
    border-left: 3px solid #00ff00;
}

.history-item.loss {
    border-left: 3px solid #ff0000;
}

.history-result {
    font-weight: bold;
}

.history-amount {
    color: #aaa;
}

.history-profit {
    color: #00ff00;
}

.history-loss {
    color: #ff4444;
}

/* SOCIAL FEATURES */
@keyframes blinkRed {

    0%,
    100% {
        border-color: #444;
        box-shadow: none;
    }

    50% {
        border-color: #ff0000;
        box-shadow: 0 0 15px #ff0000;
    }
}

.ranking-item.blinking-red {
    animation: blinkRed 1s infinite;
    border-color: #ff0000;
}

.notification-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #ff0000 0%, #990000 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    border: 2px solid #ff4444;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    font-weight: bold;
    font-size: 1.2em;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.notification-popup.show {
    transform: translateX(-50%) translateY(0);
}

/* ========== VIEWS & NAVIGATION ========== */
#views-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    padding-bottom: 70px;
    position: relative;
    z-index: 100;
}

.view {
    display: none;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 90px;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

/* Desktop margins for non-home views */
@media (min-width: 768px) {

    #view-roulette,
    #view-chat,
    #view-options {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bottom Navigation */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(to top, #1a1a1a, #252525);
    border-top: 3px solid #ff6b00;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.nav-btn {
    background: none;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
    position: relative;
}

.nav-btn:hover {
    color: #ffaa00;
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: #ff6b00;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.nav-btn.active .nav-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px rgba(255, 107, 0, 0.5));
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.nav-label {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#views-container {
    padding-bottom: 60px;
}



/* ========== VIEW CONTENT STYLES ========== */
/* Roulette View */
#view-roulette {
    max-width: 900px;
    margin: 0 auto;
}

/* Mobile optimizations for roulette */
@media (max-width: 768px) {
    #view-roulette {
        padding: 10px;
    }

    #view-roulette .betting-header {
        padding: 15px 10px;
    }

    #view-roulette .betting-header h2 {
        font-size: 1.5em;
    }

    #view-roulette .roulette-container {
        padding: 10px;
    }

    #view-roulette .bet-board {
        padding: 10px;
    }

    #view-roulette .bet-numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 5px;
    }

    #view-roulette .bet-number {
        padding: 8px 4px;
        font-size: 0.85em;
    }
}

/* Chat View */
#view-chat {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 110px);
    position: relative;
    z-index: 101;
}

/* Mobile optimizations for chat */
@media (max-width: 768px) {
    #view-chat {
        padding: 10px;
        height: calc(100vh - 90px);
    }

    #view-chat .chat-header {
        padding: 12px;
        margin-bottom: 10px;
    }

    #view-chat .chat-header h2 {
        font-size: 1.3em;
    }

    #view-chat .chat-messages {
        padding: 8px;
        gap: 0.6rem;
    }

    #view-chat .chat-msg {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    #view-chat .chat-input-area {
        padding: 8px;
        gap: 6px;
    }

    #view-chat #chatInput {
        font-size: 14px;
        padding: 10px;
    }

    #view-chat #chatSend {
        padding: 0 12px;
        font-size: 1.2em;
    }
}

/* Options View */
#view-options {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 101;
}

#view-options h2 {
    color: #ff6b00;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.option-group {
    background: #252525;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.option-group h3 {
    color: #e0e0e0;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
}

.input-group button {
    padding: 10px 20px;
    background: #ff6b00;
    border: none;
    border-radius: 4px;
    color: black;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.input-group button:hover {
    background: #ff8c00;
}

.danger-zone {
    border-color: #ff4444;
    background: rgba(50, 0, 0, 0.2);
}

.danger-zone h3 {
    color: #ff4444;
    border-color: #ff4444;
}

.btn-danger {
    width: 100%;
    padding: 12px;
    background: #cc0000;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 5px;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #ff0000;
}

.btn-danger-dark {
    width: 100%;
    padding: 12px;
    background: #500;
    color: #ffaaaa;
    border: 1px solid #800;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.btn-danger-dark:hover {
    background: #800;
    color: white;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.warning-text {
    font-size: 0.8em;
    color: #aaa;
    margin-bottom: 10px;
    font-style: italic;
}

/* Adjust main container for Home view */
#view-home .container {
    padding-bottom: 0;
}

/* Hide old toggle buttons and panels (replaced by bottom nav) */
.betting-toggle,
.betting-panel,
.chat-toggle,
.chat-panel,
.close-betting,
#closeBetting,
#closeChat {
    display: none !important;
}

/* ========== DESKTOP IMPROVEMENTS ========== */
@media (min-width: 1024px) {



    /* Better upgrade grid on desktop */
    .upgrades-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .upgrade-card {
        transition: all 0.3s ease;
    }

    .upgrade-card:not(.purchased):not(.disabled):hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
    }

    /* Better stats display */
    .stats {
        gap: 40px;
    }

    .stat-item {
        min-width: 200px;
    }

    /* Larger roulette for desktop */
    #view-roulette .roulette-wheel {
        width: 300px;
        height: 300px;
    }

    #view-roulette .bet-numbers-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 10px;
    }

    #view-roulette .bet-number {
        padding: 12px 8px;
        font-size: 1em;
    }

    #view-roulette .betting-header {
        padding: 25px;
    }

    /* Better chat on desktop */
    #view-chat .chat-messages {
        padding: 20px;
    }

    #view-chat .chat-msg {
        padding: 12px 16px;
        font-size: 1rem;
    }

    #view-chat .chat-input-area {
        padding: 20px;
    }

    #view-chat #chatInput {
        font-size: 16px;
        padding: 12px 16px;
    }

    #view-chat #chatSend {
        padding: 0 24px;
        font-size: 1.1em;
    }

    /* Better ranking panel on desktop */
    .ranking-panel {
        width: 400px;
    }

    .ranking-item {
        padding: 20px;
    }

    /* Smooth transitions on desktop */
    button,
    .upgrade-card,
    .nav-btn,
    .ranking-toggle,
    .options-link {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Better hover feedback */
    button:not(:disabled):hover,
    .nav-btn:hover,
    .ranking-toggle:hover {
        cursor: pointer;
        filter: brightness(1.1);
    }
}

/* Extra large screens */
@media (min-width: 1440px) {
    .ranking-item {
        position: relative;
        z-index: 1001;
        /* Encima del fondo */
        padding: 10px;
        margin-bottom: 4px;
    }
}

/* Button Colors & Visuals */
.click-button.color-red {
    background: linear-gradient(145deg, #ff4444, #cc0000);
    box-shadow: 0 4px 0 #990000, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #ff4444;
}

.click-button.color-orange {
    background: linear-gradient(145deg, #ffaa00, #cc8800);
    box-shadow: 0 4px 0 #996600, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #ffaa00;
}

.click-button.color-green {
    background: linear-gradient(145deg, #44ff44, #00cc00);
    box-shadow: 0 4px 0 #009900, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #44ff44;
}

.click-button.color-blue {
    background: linear-gradient(145deg, #4444ff, #0000cc);
    box-shadow: 0 4px 0 #000099, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #4444ff;
}

.click-button.color-pink {
    background: linear-gradient(145deg, #ff44ff, #cc00cc);
    box-shadow: 0 4px 0 #990099, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #ff44ff;
}

.click-button.color-purple {
    background: linear-gradient(145deg, #8844ff, #5500cc);
    box-shadow: 0 4px 0 #440099, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #8844ff;
}

.click-button.color-white {
    background: linear-gradient(145deg, #ffffff, #cccccc);
    box-shadow: 0 4px 0 #999999, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

/* Level 2: Aura */
.click-button.level-2 {
    animation: pulse-aura 2s infinite;
}

@keyframes pulse-aura {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.click-button.level-2.color-red {
    animation-name: pulse-red;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.click-button.level-2.color-orange {
    animation-name: pulse-orange;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 170, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 170, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 170, 0, 0);
    }
}

.click-button.level-2.color-green {
    animation-name: pulse-green;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(68, 255, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(68, 255, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(68, 255, 68, 0);
    }
}

.click-button.level-2.color-blue {
    animation-name: pulse-blue;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(68, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(68, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(68, 68, 255, 0);
    }
}

.click-button.level-2.color-pink {
    animation-name: pulse-pink;
}

@keyframes pulse-pink {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 255, 0);
    }
}

.click-button.level-2.color-purple {
    animation-name: pulse-purple;
}

@keyframes pulse-purple {
    0% {
        box-shadow: 0 0 0 0 rgba(136, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(136, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(136, 68, 255, 0);
    }
}

.click-button.level-2.color-white {
    animation-name: pulse-white;
}

@keyframes pulse-white {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    .nav-btn:hover,
    .ranking-toggle:hover {
        cursor: pointer;
        filter: brightness(1.1);
    }
}

/* Extra large screens */
@media (min-width: 1440px) {
    .ranking-item {
        position: relative;
        z-index: 1001;
        /* Encima del fondo */
        padding: 10px;
        margin-bottom: 4px;
    }
}

/* Button Colors & Visuals */
.click-button.color-red {
    background: linear-gradient(145deg, #ff4444, #cc0000);
    box-shadow: 0 4px 0 #990000, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-orange {
    background: linear-gradient(145deg, #ffaa00, #cc8800);
    box-shadow: 0 4px 0 #996600, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-green {
    background: linear-gradient(145deg, #44ff44, #00cc00);
    box-shadow: 0 4px 0 #009900, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-blue {
    background: linear-gradient(145deg, #4444ff, #0000cc);
    box-shadow: 0 4px 0 #000099, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-pink {
    background: linear-gradient(145deg, #ff44ff, #cc00cc);
    box-shadow: 0 4px 0 #990099, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-purple {
    background: linear-gradient(145deg, #8844ff, #5500cc);
    box-shadow: 0 4px 0 #440099, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-white {
    background: linear-gradient(145deg, #ffffff, #cccccc);
    box-shadow: 0 4px 0 #999999, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #333;
}

/* Level 2: Aura */
.click-button.level-2 {
    animation: pulse-aura 2s infinite;
}

@keyframes pulse-aura {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.click-button.level-2.color-red {
    animation-name: pulse-red;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.click-button.level-2.color-orange {
    animation-name: pulse-orange;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 170, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 170, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 170, 0, 0);
    }
}

.click-button.level-2.color-green {
    animation-name: pulse-green;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(68, 255, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(68, 255, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(68, 255, 68, 0);
    }
}

.click-button.level-2.color-blue {
    animation-name: pulse-blue;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(68, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(68, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(68, 68, 255, 0);
    }
}

.click-button.level-2.color-pink {
    animation-name: pulse-pink;
}

@keyframes pulse-pink {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 255, 0);
    }
}

.click-button.level-2.color-purple {
    animation-name: pulse-purple;
}

@keyframes pulse-purple {
    0% {
        box-shadow: 0 0 0 0 rgba(136, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(136, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(136, 68, 255, 0);
    }
}

.click-button.level-2.color-white {
    animation-name: pulse-white;
}

@keyframes pulse-white {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Level 3: Spinning Particles */
.click-button.level-3::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 230px;
    height: 230px;
    border: 2px dashed currentColor;
    opacity: 0.5;
    border-radius: 50%;
    animation: spin-particles 4s linear infinite;
    pointer-events: none;
}

.click-button.level-3::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    border: 2px dotted currentColor;
    opacity: 0.3;
    border-radius: 50%;
    animation: spin-particles 8s linear infinite reverse;
    pointer-events: none;
}

@keyframes spin-particles {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

}

.click-button.color-pink {
    background: linear-gradient(145deg, #ff44ff, #cc00cc);
    box-shadow: 0 4px 0 #990099, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-purple {
    background: linear-gradient(145deg, #8844ff, #5500cc);
    box-shadow: 0 4px 0 #440099, 0 5px 10px rgba(0, 0, 0, 0.3);
}

.click-button.color-white {
    background: linear-gradient(145deg, #ffffff, #cccccc);
    box-shadow: 0 4px 0 #999999, 0 5px 10px rgba(0, 0, 0, 0.3);
    color: #333;
}

/* Level 2: Aura */
.click-button.level-2 {
    animation: pulse-aura 2s infinite;
}

@keyframes pulse-aura {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.click-button.level-2.color-red {
    animation-name: pulse-red;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.click-button.level-2.color-orange {
    animation-name: pulse-orange;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 170, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 170, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 170, 0, 0);
    }
}

.click-button.level-2.color-green {
    animation-name: pulse-green;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(68, 255, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(68, 255, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(68, 255, 68, 0);
    }
}

.click-button.level-2.color-blue {
    animation-name: pulse-blue;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(68, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(68, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(68, 68, 255, 0);
    }
}

.click-button.level-2.color-pink {
    animation-name: pulse-pink;
}

@keyframes pulse-pink {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 255, 0);
    }
}

.click-button.level-2.color-purple {
    animation-name: pulse-purple;
}

@keyframes pulse-purple {
    0% {
        box-shadow: 0 0 0 0 rgba(136, 68, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(136, 68, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(136, 68, 255, 0);
    }
}

.click-button.level-2.color-white {
    animation-name: pulse-white;
}

@keyframes pulse-white {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Level 3: Spinning Particles */
.click-button.level-3::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 230px;
    height: 230px;
    border: 2px dashed currentColor;
    opacity: 0.5;
    border-radius: 50%;
    animation: spin-particles 4s linear infinite;
    pointer-events: none;
}

.click-button.level-3::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    border: 2px dotted currentColor;
    opacity: 0.3;
    border-radius: 50%;
    animation: spin-particles 8s linear infinite reverse;
    pointer-events: none;
}

@keyframes spin-particles {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.click-value-link {
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
}

.click-value-link:hover {
    transform: scale(1.1);
}

/* Level 4: Double Pulse */
.click-button.level-4 {
    animation: level4-pulse 2s infinite;
}

@keyframes level4-pulse {
    0% {
        box-shadow: 0 0 0 0 currentColor;
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Level 5: Rotating Border */
.click-button.level-5::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-bottom-color: currentColor;
    border-radius: 50%;
    animation: spin-border 3s linear infinite;
}

@keyframes spin-border {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.click-button.level-6::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-bottom-color: currentColor;
    border-radius: 50%;
    animation: spin-border 1s linear infinite;
}

@keyframes spin-border {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Level 7: Shockwave */
.click-button.level-7::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 4px solid currentColor;
    border-radius: 50%;
    animation: level7-shockwave 2s infinite;

}

@keyframes level7-shockwave {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 180%;
        height: 180%;
        opacity: 0;
    }




}

/* Level 8: Neon Flicker */
.click-button.level-8 {
    box-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
    animation: level8-neon 1.5s infinite alternate;
}

@keyframes level8-neon {

    20%,
    24%,
    55% {
        box-shadow: none;
    }
}


.click-button.level-9::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 230px;
    height: 230px;
    border: 2px dashed currentColor;
    opacity: 0.5;
    border-radius: 50%;
    animation: spin-particles 5s linear infinite;
    pointer-events: none;
}

.click-button.level-9::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    border: 2px dashed currentColor;
    opacity: 0.5;
    border-radius: 50%;
    animation: spin-particles 10s linear infinite reverse;
    pointer-events: none;
}




@keyframes spin-particles {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* Level 10: God Mode */
.click-button.level-10 {
    animation: level10-god 2s infinite;
}

.click-button.level-10::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 4px dashed currentColor;
    border-radius: 50%;
    animation: spin-god 5s linear infinite;
}

@keyframes level10-god {
    50% {
        filter: brightness(1.5);
        box-shadow: 0 0 40px currentColor;
    }
}

@keyframes spin-god {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ========== POPUP SYSTEM ========== */
#popup-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Allow clicks to pass through container */
}

.game-popup {
    background: rgba(26, 26, 26, 0.95);
    border: 2px solid #ff6b00;
    border-radius: 8px;
    padding: 15px 25px;
    color: #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    max-width: 90vw;
    pointer-events: auto;
    /* Re-enable clicks on popups */
    animation: popupSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    overflow: hidden;
}

.game-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ff6b00;
}

.game-popup.success {
    border-color: #00ff00;
}

.game-popup.success::before {
    background: #00ff00;
}

.game-popup.error {
    border-color: #ff0000;
}

.game-popup.error::before {
    background: #ff0000;
}

.game-popup.info {
    border-color: #00ccff;
}

.game-popup.info::before {
    background: #00ccff;
}

.popup-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
    display: block;
}

.popup-message {
    font-size: 0.95em;
    line-height: 1.4;
}

.popup-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    line-height: 1;
}

.popup-close:hover {
    color: #fff;
}

@keyframes popupSlideIn {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {}

    /* Level 8: Neon Flicker */
    .click-button.level-8 {
        box-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
        animation: level8-neon 1.5s infinite alternate;
    }

    @keyframes level8-neon {

        20%,
        24%,
        55% {
            box-shadow: none;
        }
    }


    .click-button.level-9::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 230px;
        height: 230px;
        border: 2px dashed currentColor;
        opacity: 0.5;
        border-radius: 50%;
        animation: spin-particles 5s linear infinite;
        pointer-events: none;
    }

    .click-button.level-9::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 260px;
        height: 260px;
        border: 2px dashed currentColor;
        opacity: 0.5;
        border-radius: 50%;
        animation: spin-particles 10s linear infinite reverse;
        pointer-events: none;
    }




    @keyframes spin-particles {
        from {
            transform: translate(-50%, -50%) rotate(0deg);
        }

        to {
            transform: translate(-50%, -50%) rotate(360deg);
        }
    }


    /* Level 10: God Mode */
    .click-button.level-10 {
        animation: level10-god 2s infinite;
    }

    .click-button.level-10::after {
        content: '';
        position: absolute;
        top: -20px;
        left: -20px;
        right: -20px;
        bottom: -20px;
        border: 4px dashed currentColor;
        border-radius: 50%;
        animation: spin-god 5s linear infinite;
    }

    @keyframes level10-god {
        50% {
            filter: brightness(1.5);
            box-shadow: 0 0 40px currentColor;
        }
    }

    @keyframes spin-god {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    /* ========== POPUP SYSTEM ========== */
    #popup-container {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 20000;
        display: flex;
        flex-direction: column;
        gap: 10px;
        pointer-events: none;
        /* Allow clicks to pass through container */
    }

    .game-popup {
        background: rgba(26, 26, 26, 0.95);
        border: 2px solid #ff6b00;
        border-radius: 8px;
        padding: 15px 25px;
        color: #e0e0e0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        min-width: 300px;
        max-width: 90vw;
        pointer-events: auto;
        /* Re-enable clicks on popups */
        animation: popupSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        position: relative;
        overflow: hidden;
    }

    .game-popup::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: #ff6b00;
    }

    .game-popup.success {
        border-color: #00ff00;
    }

    .game-popup.success::before {
        background: #00ff00;
    }

    .game-popup.error {
        border-color: #ff0000;
    }

    .game-popup.error::before {
        background: #ff0000;
    }

    .game-popup.info {
        border-color: #00ccff;
    }

    .game-popup.info::before {
        background: #00ccff;
    }

    .popup-title {
        font-weight: bold;
        font-size: 1.1em;
        margin-bottom: 5px;
        display: block;
    }

    .popup-message {
        font-size: 0.95em;
        line-height: 1.4;
    }

    .popup-close {
        position: absolute;
        top: 5px;
        right: 10px;
        background: none;
        border: none;
        color: #888;
        cursor: pointer;
        font-size: 1.2em;
        padding: 0;
        line-height: 1;
    }

    .popup-close:hover {
        color: #fff;
    }

    @keyframes popupSlideIn {
        0% {
            transform: translateY(-100%);
            opacity: 0;
        }

        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes popupFadeOut {
        0% {
            transform: translateY(0);
            opacity: 1;
        }

        100% {
            transform: translateY(-20px);
            opacity: 0;
        }
    }

    /* Legendary Popup Style */
    .game-popup.legendary {
        border: 5px solid transparent;
        background:
            linear-gradient(#1a1a1a, #1a1a1a) padding-box,
            linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000) border-box;
        background-size: 100% 100%, 400% 400%;
        animation: gradientBorder 3s ease infinite;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    .game-popup.legendary::before {
        display: none;
    }

    .game-popup.legendary .popup-title {
        color: #fffb00;
        text-shadow: 0 0 5px rgba(255, 251, 0, 0.5);
        font-size: 1.2em;
        text-transform: uppercase;
    }

    @keyframes gradientBorder {
        0% {
            background-position: 0 0, 0% 50%;
        }

        50% {
            background-position: 0 0, 100% 50%;

            @keyframes spin-particles {
                from {
                    transform: translate(-50%, -50%) rotate(0deg);
                }

                to {
                    transform: translate(-50%, -50%) rotate(360deg);
                }
            }


            /* Level 10: God Mode */
            .click-button.level-10 {
                animation: level10-god 2s infinite;
            }

            .click-button.level-10::after {
                content: '';
                position: absolute;
                top: -20px;
                left: -20px;
                right: -20px;
                bottom: -20px;
                border: 4px dashed currentColor;
                border-radius: 50%;
                animation: spin-god 5s linear infinite;
            }

            @keyframes level10-god {
                50% {
                    filter: brightness(1.5);
                    box-shadow: 0 0 40px currentColor;
                }
            }

            @keyframes spin-god {
                from {
                    transform: rotate(0deg);
                }

                to {
                    transform: rotate(360deg);
                }
            }

            /* ========== POPUP SYSTEM ========== */
            #popup-container {
                position: fixed;
                top: 20px;
                left: 50%;
                transform: translateX(-50%);
                z-index: 20000;
                display: flex;
                flex-direction: column;
                gap: 10px;
                pointer-events: none;
                /* Allow clicks to pass through container */
            }

            .game-popup {
                background: rgba(26, 26, 26, 0.95);
                border: 2px solid #ff6b00;
                border-radius: 8px;
                padding: 15px 25px;
                color: #e0e0e0;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
                min-width: 300px;
                max-width: 90vw;
                pointer-events: auto;
                /* Re-enable clicks on popups */
                animation: popupSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
                position: relative;
                overflow: hidden;
            }

            .game-popup::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 4px;
                height: 100%;
                background: #ff6b00;
            }

            .game-popup.success {
                border-color: #00ff00;
            }

            .game-popup.success::before {
                background: #00ff00;
            }

            .game-popup.error {
                border-color: #ff0000;
            }

            .game-popup.error::before {
                background: #ff0000;
            }

            .game-popup.info {
                border-color: #00ccff;
            }

            .game-popup.info::before {
                background: #00ccff;
            }

            .popup-title {
                font-weight: bold;
                font-size: 1.1em;
                margin-bottom: 5px;
                display: block;
            }

            .popup-message {
                font-size: 0.95em;
                line-height: 1.4;
            }

            .popup-close {
                position: absolute;
                top: 5px;
                right: 10px;
                background: none;
                border: none;
                color: #888;
                cursor: pointer;
                font-size: 1.2em;
                padding: 0;
                line-height: 1;
            }

            .popup-close:hover {
                color: #fff;
            }

            @keyframes popupSlideIn {
                0% {
                    transform: translateY(-100%);
                    opacity: 0;
                }

                100% {
                    transform: translateY(0);
                    opacity: 1;
                }
            }

            @keyframes popupFadeOut {
                0% {
                    transform: translateY(0);
                    opacity: 1;
                }

                100% {
                    transform: translateY(-20px);
                    opacity: 0;
                }
            }

            /* Legendary Popup Style */
            .game-popup.legendary {
                border: 5px solid transparent;
                background:
                    linear-gradient(#1a1a1a, #1a1a1a) padding-box,
                    linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000) border-box;
                background-size: 100% 100%, 400% 400%;
                animation: gradientBorder 3s ease infinite;
                box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
            }

            .game-popup.legendary::before {
                display: none;
            }

            .game-popup.legendary .popup-title {
                color: #fffb00;
                text-shadow: 0 0 5px rgba(255, 251, 0, 0.5);
                font-size: 1.2em;
                text-transform: uppercase;
            }

            @keyframes gradientBorder {
                0% {
                    background-position: 0 0, 0% 50%;
                }

                50% {
                    background-position: 0 0, 100% 50%;
                }

                100% {
                    background-position: 0 0, 0% 50%;
                }
            }