/* Wild West frontier styling */
@import url('https://fonts.googleapis.com/css2?family=Rye:wght@400&family=Cinzel:wght@400;600;700&display=swap');

.font-western {
    font-family: 'Rye', 'Cinzel', serif;
}

.western-background {
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 69, 19, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(210, 180, 140, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #2d1b0e 0%, #1a0f08 100%);
}

.dust-overlay {
    background: 
        url('data:image/svg+xml;utf8,<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"><filter id="dustFilter"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="6" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23dustFilter)" opacity="0.04"/></svg>');
    animation: dustDrift 12s linear infinite;
}

@keyframes dustDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, -15px) rotate(0.5deg); }
    50% { transform: translate(-5px, -25px) rotate(-0.3deg); }
    75% { transform: translate(8px, -20px) rotate(0.4deg); }
}

.alert-pulse {
    animation: alertPulse 2.5s ease-in-out infinite alternate;
}

@keyframes alertPulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.01); }
}

.western-frame {
    position: relative;
    box-shadow: 
        inset 2px 2px 4px rgba(184, 115, 51, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.4);
}

.western-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #B87333, #8B4513, #D2B48C, #8B4513);
    border-radius: inherit;
    z-index: -1;
}

.western-shadow {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.western-button {
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.western-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.western-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.frontier-glow {
    text-shadow: 0 0 8px currentColor;
}

/* Lantern light effect for evening atmosphere */
.lantern-glow {
    animation: lanternFlicker 3s ease-in-out infinite alternate;
}

@keyframes lanternFlicker {
    0% { opacity: 0.8; }
    25% { opacity: 0.9; }
    50% { opacity: 0.85; }
    75% { opacity: 0.95; }
    100% { opacity: 0.87; }
}

/* Smooth transitions for resource bars */
.transition-all {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar with western theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #2d1b0e;
    border-radius: 5px;
    border: 1px solid #8B4513;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #D2B48C, #8B4513);
    border-radius: 5px;
    border: 1px solid #B87333;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #F5DEB3, #A0522D);
}

/* Text effects for wanted poster style */
.wanted-poster {
    background: 
        linear-gradient(45deg, #D2B48C 0%, #F5DEB3 50%, #D2B48C 100%);
    color: #2d1b0e;
    text-shadow: 1px 1px 2px rgba(139, 69, 19, 0.3);
    border: 3px solid #8B4513;
    box-shadow: 
        inset 0 0 10px rgba(139, 69, 19, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .dust-overlay {
        animation: none; /* Reduce animation on mobile for performance */
    }
    
    .font-western {
        font-size: 0.9em; /* Slightly smaller text on mobile */
    }
}

/* Weather effects */
.weather-overlay {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

.rain-effect {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><defs><pattern id="rain" x="0" y="0" width="20" height="100" patternUnits="userSpaceOnUse"><line x1="10" y1="0" x2="5" y2="100" stroke="%23ADD8E6" stroke-width="0.5" opacity="0.6"/></pattern></defs><rect width="100%" height="100%" fill="url(%23rain)"/></svg>');
    animation: rainFall 2s linear infinite;
}

@keyframes rainFall {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* Seasonal color adjustments */
.season-spring { filter: hue-rotate(20deg) saturate(1.1); }
.season-summer { filter: hue-rotate(-10deg) saturate(1.2) brightness(1.05); }
.season-fall { filter: hue-rotate(15deg) saturate(0.9); }
.season-winter { filter: hue-rotate(-20deg) saturate(0.7) brightness(0.9); }