/* Bird Clicker Game Styles */

.game-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    margin-top: 20px;
}

.main-game-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Stats Panel */
.stats-panel {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 14px;
    color: #bcdcff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.golden-stat-value {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

/* Click Area */
.click-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
    min-height: 400px;
    cursor: pointer;
    user-select: none;
}

.bird {
    font-size: 120px;
    transition: transform 0.1s ease;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.6));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.click-hint {
    margin-top: 20px;
    color: #bcdcff;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.click-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.click-popup {
    position: absolute;
    font-size: 24px;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    pointer-events: none;
    animation: popup 1s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes popup {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -70%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(1);
    }
}

.golden-click-popup {
    color: #ffd700 !important;
    text-shadow: 
        0 0 10px #ffd700,
        0 0 20px #ffd700,
        2px 2px 0px #000 !important;
}

.golden-egg-popup {
    position: absolute;
    font-size: 20px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 
        0 0 10px #ffd700,
        0 0 20px #ffd700,
        2px 2px 0px #000;
    pointer-events: none;
    animation: goldenEggPopup 2s ease-out forwards;
    transform: translate(-50%, -50%);
    z-index: 10;
}

@keyframes goldenEggPopup {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8) rotate(-5deg);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -80%) scale(1.3) rotate(5deg);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -100%) scale(1.2) rotate(-3deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1) rotate(0deg);
    }
}

/* Upgrades Panel */
.upgrades-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #00ffff;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
    padding: 24px;
}

.panel-title {
    font-size: 24px;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.upgrade-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-item:hover:not(.disabled) {
    background: rgba(0, 255, 255, 0.15);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: translateX(5px);
}

.upgrade-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-emoji {
    font-size: 36px;
    width: 50px;
    text-align: center;
}

.upgrade-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upgrade-name {
    font-size: 18px;
    font-weight: 700;
    color: #00ffff;
}

.upgrade-desc {
    font-size: 14px;
    color: #bcdcff;
}

.upgrade-owned {
    font-size: 12px;
    color: #888;
}

.upgrade-cost {
    font-size: 18px;
    font-weight: 700;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    min-width: 120px;
    text-align: right;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    padding: 6px;
    overflow-x: auto;
    max-width: 100%;
}

.sidebar-tab-button {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    background: transparent;
    color: #bcdcff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.sidebar-tab-button:hover {
    color: #ffd700;
}

.sidebar-tab-button.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.sidebar-tab-panels {
    display: block;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.auto-clickers-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ff00ff;
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.4);
    padding: 24px;
}

.auto-clickers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.auto-clicker-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 0, 255, 0.05);
    border: 2px solid rgba(255, 0, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auto-clicker-item:hover:not(.disabled) {
    background: rgba(255, 0, 255, 0.15);
    border-color: #ff00ff;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
    transform: translateX(5px);
}

.auto-clicker-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.clicker-emoji {
    font-size: 36px;
    width: 50px;
    text-align: center;
}

.clicker-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clicker-name {
    font-size: 18px;
    font-weight: 700;
    color: #ff00ff;
}

.clicker-desc {
    font-size: 14px;
    color: #bcdcff;
}

.clicker-owned {
    font-size: 12px;
    color: #888;
}

.clicker-cost {
    font-size: 18px;
    font-weight: 700;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    min-width: 120px;
    text-align: right;
}

/* Rebirth Panel */
.rebirth-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    padding: 24px;
}

.rebirth-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.rebirth-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.rebirth-label {
    font-size: 14px;
    color: #bcdcff;
    font-weight: 600;
}

.rebirth-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.rebirth-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 3px solid #ffd700;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.rebirth-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
    transform: translateY(-2px);
}

.rebirth-btn:active {
    transform: translateY(0px);
}

/* Golden Egg Panel */
.golden-egg-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    padding: 24px;
}

.golden-eggs-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    margin-bottom: 16px;
}

.golden-eggs-label {
    font-size: 16px;
    color: #bcdcff;
    font-weight: 600;
}

.golden-eggs-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.golden-egg-shop-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.golden-buff-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.golden-buff-item:hover:not(.disabled) {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: translateX(5px);
}

.golden-buff-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.golden-buff-emoji {
    font-size: 36px;
    width: 50px;
    text-align: center;
}

.golden-buff-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.golden-buff-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.golden-buff-desc {
    font-size: 14px;
    color: #bcdcff;
}

.golden-buff-level {
    font-size: 12px;
    color: #888;
}

.golden-buff-cost {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
    min-width: 100px;
    text-align: right;
}

/* Ancients Panel */
.ancients-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    padding: 24px;
}

.ancients-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.ancient-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ancient-item:hover:not(.disabled) {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: translateX(5px);
}

.ancient-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ancient-emoji {
    font-size: 36px;
    width: 50px;
    text-align: center;
}

.ancient-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ancient-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.ancient-level {
    font-size: 14px;
    color: #bcdcff;
    font-weight: 600;
}

.ancient-desc {
    font-size: 14px;
    color: #bcdcff;
}

.ancient-cost {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
    min-width: 120px;
    text-align: right;
}

/* Save Panel */
.save-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.save-btn, .reset-btn {
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #00ffff;
    background: rgba(0, 0, 0, 0.9);
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.save-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

.reset-btn {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.reset-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.6);
    transform: translateY(-2px);
}

/* Custom confirmation / alert modal */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: confirmFadeIn 0.2s ease-out;
}

.confirm-overlay[hidden] {
    display: none !important;
}

@keyframes confirmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirm-box {
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #00ffff;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.5), inset 0 0 30px rgba(0, 255, 255, 0.05);
    padding: 28px;
    max-width: 420px;
    width: 100%;
    animation: confirmSlideIn 0.25s ease-out;
}

@keyframes confirmSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confirm-title {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 12px #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.confirm-message {
    margin: 0 0 24px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #bcdcff;
    white-space: pre-line;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.confirm-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.confirm-cancel {
    border-color: #666;
    color: #bcdcff;
    background: rgba(255, 255, 255, 0.05);
}

.confirm-cancel:hover {
    border-color: #00ffff;
    color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
}

.confirm-ok {
    border-color: #ffd700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.confirm-ok:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
}

/* Alert-only mode: single OK button (gold) */
.confirm-box.confirm-alert .confirm-ok {
    border-color: #00ffff;
    color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.confirm-box.confirm-alert .confirm-ok:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

/* Scrollbar Styling */
.upgrades-list::-webkit-scrollbar,
.auto-clickers-list::-webkit-scrollbar,
.ancients-list::-webkit-scrollbar,
.golden-egg-shop-list::-webkit-scrollbar {
    width: 8px;
}

.upgrades-list::-webkit-scrollbar-track,
.auto-clickers-list::-webkit-scrollbar-track,
.ancients-list::-webkit-scrollbar-track,
.golden-egg-shop-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.upgrades-list::-webkit-scrollbar-thumb,
.auto-clickers-list::-webkit-scrollbar-thumb,
.ancients-list::-webkit-scrollbar-thumb,
.golden-egg-shop-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.5);
    border-radius: 4px;
}

.upgrades-list::-webkit-scrollbar-thumb:hover,
.auto-clickers-list::-webkit-scrollbar-thumb:hover,
.ancients-list::-webkit-scrollbar-thumb:hover,
.golden-egg-shop-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .stats-panel {
        flex-direction: column;
        gap: 12px;
    }
    
    .bird {
        font-size: 80px;
    }
    
    .click-area {
        min-height: 300px;
        padding: 40px;
    }
    
    .upgrade-item,
    .auto-clicker-item,
    .ancient-item,
    .golden-buff-item {
        flex-wrap: wrap;
    }
    
    .upgrade-cost,
    .clicker-cost,
    .ancient-cost,
    .golden-buff-cost {
        width: 100%;
        text-align: left;
        margin-top: 8px;
    }
}
