@font-face {
    font-family: 'Minecraft';
    src: url('Minecraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'Minecraft', 'Orbitron', monospace;
    background: url('stonetexture.jpg') repeat;
    background-size: 400px 400px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: stone-texture-move 30s linear infinite;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.1) 0%,
            transparent 20%,
            transparent 80%,
            rgba(0, 0, 0, 0.2) 100%
        );
    pointer-events: none;
}



.flying-elements-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    perspective: 1000px;
}

.flying-element {
    position: absolute;
    font-size: 30px;
    width: 40px;
    height: 40px;
    pointer-events: none;
    user-select: none;
    z-index: -1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.flying-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}




@keyframes water-droplet-fall {
    0% {
        transform: translateY(-50px) translateX(0) scale(0.8) rotate(0deg);
        opacity: 0.7;
    }
    3% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) translateX(var(--horizontal-drift, 0px)) scale(0.9) rotate(var(--rotation, 0deg));
        opacity: 0;
    }
}

.flying-element.droplet-animation {
    animation: water-droplet-fall var(--duration) cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}


@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

@keyframes stone-texture-move {
    0% { background-position: 0 0; }
    100% { background-position: -400px -400px; }
}

.game-container {
    display: flex;
    gap: 50px;
    max-width: 1600px;
    width: 100%;
    padding: 30px;
    z-index: 1;
    position: relative;
}

.main-section {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-title {
    font-family: 'Minecraft', 'Bebas Neue', cursive;
    font-size: 120px;
    color: #FFD700;
    margin-bottom: 50px;
    text-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.6),
        2px 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 6px;
    animation: glow-pulse 2s ease-in-out infinite;
    position: relative;
    white-space: nowrap;
}

@keyframes glow-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.score-display {
    text-align: center;
    margin-bottom: 60px;
}

.score {
    font-family: 'Minecraft', monospace;
    font-size: 72px;
    font-weight: normal;
    color: #FFD700;
    margin-bottom: 15px;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        2px 2px 8px rgba(0, 0, 0, 0.8);
    animation: score-glow 1.5s ease-in-out infinite;
    position: relative;
}

@keyframes score-glow {
    0%, 100% { 
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.5);
    }
    50% { 
        text-shadow: 
            0 0 40px rgba(255, 215, 0, 1),
            0 0 80px rgba(255, 215, 0, 0.7);
    }
}

.per-second {
    font-family: 'Minecraft', monospace;
    font-size: 24px;
    color: #FFA500;
    text-shadow: 
        0 0 15px rgba(255, 165, 0, 0.6),
        2px 2px 6px rgba(0, 0, 0, 0.8);
    display: inline-block;
}

.clicker-container {
    position: relative;
    margin-bottom: 40px;
}

.gold-nugget {
    width: 200px;
    height: 200px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    animation: float 3s ease-in-out infinite;
    display: inline-block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

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

.gold-nugget:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 50px rgba(255, 215, 0, 1));
}

.gold-nugget.clicked {
    animation: nugget-click 0.3s ease-out;
}

@keyframes nugget-click {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(0.8) rotate(-10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.floating-number {
    position: absolute;
    font-family: 'Minecraft', monospace;
    font-size: 32px;
    font-weight: normal;
    color: #FFD700;
    text-shadow: 
        2px 2px 6px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(255, 215, 0, 0.8);
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
    z-index: 1000;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1.5);
    }
}

.gold-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes particle-burst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--burst-x), var(--burst-y)) scale(0.3);
    }
}

.gold-splat {
    position: absolute;
    background: radial-gradient(ellipse, rgba(255, 215, 0, 0.6), rgba(255, 215, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 998;
    animation: splat-fade 4s ease-out forwards;
}

@keyframes splat-fade {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

.upgrade-section {
    width: 450px;
    background: 
        linear-gradient(135deg, rgba(101, 67, 33, 0.95), rgba(139, 69, 19, 0.95)),
        repeating-linear-gradient(
            90deg,
            rgba(160, 82, 45, 0.1) 0px,
            rgba(160, 82, 45, 0.1) 2px,
            transparent 2px,
            transparent 20px
        );
    border: 4px solid #8B4513;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.7),
        inset 0 0 30px rgba(0, 0, 0, 0.6),
        inset 2px 2px 4px rgba(139, 69, 19, 0.3);
    position: relative;
}

.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: 
        linear-gradient(135deg, rgba(139, 69, 19, 0.9), rgba(101, 67, 33, 0.9)),
        repeating-linear-gradient(
            0deg,
            rgba(160, 82, 45, 0.1) 0px,
            rgba(160, 82, 45, 0.1) 1px,
            transparent 1px,
            transparent 8px
        );
    color: #F5DEB3;
    border: 3px solid #654321;
    border-radius: 4px;
    font-family: 'Minecraft', monospace;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    box-shadow: 
        inset 1px 1px 2px rgba(160, 82, 45, 0.3),
        2px 2px 8px rgba(0, 0, 0, 0.5);
}

.tab-button:hover {
    background: 
        linear-gradient(135deg, rgba(160, 82, 45, 0.9), rgba(139, 69, 19, 0.9)),
        repeating-linear-gradient(
            0deg,
            rgba(210, 180, 140, 0.1) 0px,
            rgba(210, 180, 140, 0.1) 1px,
            transparent 1px,
            transparent 8px
        );
    color: #F5DEB3;
    transform: translateY(-1px);
    box-shadow: 
        inset 1px 1px 3px rgba(210, 180, 140, 0.4),
        3px 3px 10px rgba(0, 0, 0, 0.6);
}

.tab-button.active {
    background: 
        linear-gradient(135deg, rgba(160, 82, 45, 1), rgba(139, 69, 19, 1)),
        repeating-linear-gradient(
            0deg,
            rgba(210, 180, 140, 0.15) 0px,
            rgba(210, 180, 140, 0.15) 1px,
            transparent 1px,
            transparent 8px
        );
    color: #F5DEB3;
    border-color: #A0522D;
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.7),
        inset 1px 1px 3px rgba(210, 180, 140, 0.4),
        0 0 15px rgba(160, 82, 45, 0.4);
}

.tab-content {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.tab-content.hidden {
    display: none;
}

.buildings-container,
.upgrades-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.building-item,
.upgrade-item {
    background: 
        linear-gradient(135deg, rgba(101, 67, 33, 0.85), rgba(139, 69, 19, 0.85)),
        repeating-linear-gradient(
            90deg,
            rgba(160, 82, 45, 0.08) 0px,
            rgba(160, 82, 45, 0.08) 1px,
            transparent 1px,
            transparent 12px
        );
    border: 3px solid #654321;
    border-radius: 6px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.6),
        inset 1px 1px 2px rgba(160, 82, 45, 0.2);
}

.building-item:hover,
.upgrade-item:hover {
    background: 
        linear-gradient(135deg, rgba(139, 69, 19, 0.9), rgba(160, 82, 45, 0.9)),
        repeating-linear-gradient(
            90deg,
            rgba(210, 180, 140, 0.1) 0px,
            rgba(210, 180, 140, 0.1) 1px,
            transparent 1px,
            transparent 12px
        );
    border-color: #A0522D;
    transform: translateX(3px) translateY(-1px);
    box-shadow: 
        3px 3px 12px rgba(0, 0, 0, 0.8),
        inset 1px 1px 3px rgba(210, 180, 140, 0.3);
}

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

.building-item.disabled:hover,
.upgrade-item.disabled:hover {
    transform: none;
    box-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.6),
        inset 1px 1px 2px rgba(160, 82, 45, 0.2);
    border-color: #654321;
}

.item-name {
    font-family: 'Minecraft', monospace;
    font-size: 24px;
    font-weight: normal;
    color: #F5DEB3;
    margin-bottom: 10px;
    text-shadow: 
        2px 2px 6px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(245, 222, 179, 0.3);
}

.item-owned {
    font-family: 'Minecraft', monospace;
    background: linear-gradient(135deg, #CD853F, #A0522D);
    color: #F5DEB3;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid #654321;
    font-size: 14px;
    margin-left: 12px;
    font-weight: normal;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

.item-cost {
    font-family: 'Minecraft', monospace;
    font-size: 18px;
    color: #DEB887;
    margin-bottom: 8px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.item-description {
    font-family: 'Minecraft', monospace;
    font-size: 16px;
    color: #D2B48C;
    opacity: 0.9;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.coming-soon {
    background: 
        linear-gradient(135deg, rgba(51, 34, 17, 0.7), rgba(69, 42, 21, 0.7)),
        repeating-linear-gradient(
            90deg,
            rgba(101, 67, 33, 0.05) 0px,
            rgba(101, 67, 33, 0.05) 1px,
            transparent 1px,
            transparent 12px
        );
    border: 2px dashed #654321;
    opacity: 0.6;
}

.coming-soon .item-name {
    font-family: 'Minecraft', monospace;
    color: #BC9A6A;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Scrollbar styling */
.tab-content::-webkit-scrollbar {
    width: 12px;
}

.tab-content::-webkit-scrollbar-track {
    background: rgba(51, 34, 17, 0.7);
    border-radius: 3px;
    border: 1px solid #654321;
}

.tab-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8B4513, #654321);
    border-radius: 3px;
    border: 1px solid #A0522D;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #A0522D, #8B4513);
}

.volume-controls-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: 
        linear-gradient(135deg, rgba(101, 67, 33, 0.95), rgba(139, 69, 19, 0.95)),
        repeating-linear-gradient(
            45deg,
            rgba(160, 82, 45, 0.1) 0px,
            rgba(160, 82, 45, 0.1) 1px,
            transparent 1px,
            transparent 10px
        );
    border: 3px solid #654321;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 
        3px 3px 15px rgba(0, 0, 0, 0.8),
        inset 1px 1px 3px rgba(160, 82, 45, 0.3);
    z-index: 100;
}

.compact-volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 8px 0;
}

.compact-volume-label {
    font-family: 'Minecraft', monospace;
    color: #F5DEB3;
    font-size: 16px;
    font-weight: normal;
    width: 60px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.compact-volume-slider {
    width: 100px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #654321, #8B4513);
    border-radius: 3px;
    outline: none;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.6);
}

.compact-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #CD853F, #A0522D);
    border: 2px solid #654321;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        2px 2px 6px rgba(0, 0, 0, 0.8),
        inset 0 0 3px rgba(245, 222, 179, 0.3);
}

.compact-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #CD853F, #A0522D);
    border: 2px solid #654321;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        2px 2px 6px rgba(0, 0, 0, 0.8),
        inset 0 0 3px rgba(245, 222, 179, 0.3);
}

.compact-volume-value {
    font-family: 'Minecraft', monospace;
    color: #DEB887;
    font-size: 14px;
    width: 45px;
    text-align: right;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.social-links {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #B8860B, #8B6914);
    border: 2px solid #FFD700;
    border-radius: 50%;
    color: #FFD700;
    text-decoration: none;
    font-size: 24px;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.social-icon:hover {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.pickaxe-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: filter 0.3s;
}

.social-icon:hover .pickaxe-icon {
    filter: brightness(0) saturate(100%) invert(0) sepia(100%) saturate(10000%) hue-rotate(35deg);
}

.total-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    background: 
        linear-gradient(135deg, rgba(101, 67, 33, 0.95), rgba(139, 69, 19, 0.95)),
        repeating-linear-gradient(
            45deg,
            rgba(160, 82, 45, 0.1) 0px,
            rgba(160, 82, 45, 0.1) 1px,
            transparent 1px,
            transparent 10px
        );
    border: 3px solid #654321;
    border-radius: 8px;
    padding: 15px 25px;
    box-shadow: 
        3px 3px 15px rgba(0, 0, 0, 0.8),
        inset 1px 1px 3px rgba(160, 82, 45, 0.3);
    z-index: 100;
}

.total-counter-label {
    font-family: 'Minecraft', monospace;
    color: #D2B48C;
    font-size: 12px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.total-counter-value {
    font-family: 'Minecraft', monospace;
    color: #F5DEB3;
    font-size: 20px;
    font-weight: normal;
    text-shadow: 
        2px 2px 6px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(245, 222, 179, 0.4);
}

/* Mobile responsiveness */
@media (max-width: 1200px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }
    
    .upgrade-section {
        width: 100%;
        max-width: 450px;
    }
    
    .game-title {
        font-size: 80px;
        letter-spacing: 4px;
    }
    
    .score {
        font-size: 48px;
        padding: 8px 16px;
    }
    
    .gold-nugget {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 600px) {
    .game-title {
        font-size: 60px;
        letter-spacing: 3px;
    }
    
    .score {
        font-size: 36px;
        padding: 6px 12px;
    }
    
    .per-second {
        font-size: 18px;
        padding: 4px 10px;
    }
    
    .gold-nugget {
        width: 120px;
        height: 120px;
    }
    
    .volume-controls-overlay {
        bottom: 10px;
        left: 10px;
    }
    
    .total-counter {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
    }
    
    .total-counter-value {
        font-size: 16px;
    }
    
    .item-name {
        font-size: 20px;
    }
    
    .item-cost {
        font-size: 16px;
    }
    
    .item-description {
        font-size: 14px;
    }
    
    .compact-volume-label {
        font-size: 14px;
        width: 55px;
    }
    
    .compact-volume-value {
        font-size: 12px;
        width: 40px;
    }
    
    .volume-controls-overlay {
        padding: 15px;
    }
}