/**
 * D&D AI RPG - Weather System Styles
 * Weather display, particles, and visual effects
 */

/* Weather Display - Fixed in top corner (below time) */
.weather-display {
    position: fixed;
    top: 60px;
    right: 10px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.weather-display:hover {
    transform: scale(1.05);
    border-color: #2980b9;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.weather-icon {
    font-size: 24px;
}

.weather-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weather-name {
    font-size: 12px;
    color: #3498db;
    font-weight: bold;
}

.weather-temp {
    font-size: 11px;
    color: #95a5a6;
}

/* Weather Notification */
.weather-notification {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
    border: 2px solid #3498db;
    border-radius: 15px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 5000;
    opacity: 0;
    transition: all 0.5s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 300px;
}

.weather-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.weather-notification-icon {
    font-size: 40px;
}

.weather-notification-text {
    flex: 1;
}

.weather-notification-title {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 4px;
}

.weather-notification-desc {
    font-size: 13px;
    color: #bdc3c7;
    font-style: italic;
}

/* Weather Panel */
.weather-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.weather-panel-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #3498db;
    border-radius: 15px;
    max-width: 500px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.weather-panel-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-panel-header h2 {
    margin: 0;
    color: white;
    font-size: 18px;
}

.weather-panel-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.weather-panel-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.weather-panel-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 60px);
}

/* Current Weather Display */
.weather-current {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 15px;
}

.weather-big-icon {
    font-size: 60px;
}

.weather-current-info {
    flex: 1;
}

.weather-current-name {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

.weather-current-temp {
    font-size: 32px;
    color: #ecf0f1;
    margin-top: 5px;
}

.weather-current-details {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

.weather-description {
    font-style: italic;
    color: #bdc3c7;
    text-align: center;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Weather Effects */
.weather-effects-section,
.weather-climate-section,
.weather-forecast {
    margin-bottom: 20px;
}

.weather-effects-section h3,
.weather-climate-section h3,
.weather-forecast h3 {
    color: #3498db;
    font-size: 14px;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}

.weather-effects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-effect {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 13px;
}

.weather-effect.positive .effect-value {
    color: #2ecc71;
}

.weather-effect.negative .effect-value {
    color: #e74c3c;
}

.weather-effect.warning .effect-value {
    color: #f39c12;
}

.effect-label {
    color: #bdc3c7;
}

.effect-value {
    font-weight: bold;
}

.no-effects {
    color: #7f8c8d;
    text-align: center;
    font-style: italic;
    padding: 10px;
}

.forecast-info {
    color: #bdc3c7;
    font-size: 13px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

/* Weather Particles Container */
.weather-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

/* Particle Styles */
.weather-particle {
    position: absolute;
    pointer-events: none;
}

/* Rain particles */
.particle-rain,
.particle-heavy-rain {
    background: linear-gradient(to bottom, transparent, rgba(174, 214, 241, 0.6));
    border-radius: 0 0 50% 50%;
    animation: rain-fall linear infinite;
}

@keyframes rain-fall {
    0% {
        transform: translateY(-10vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(20px);
        opacity: 0;
    }
}

/* Snow particles */
.particle-snow,
.particle-heavy-snow {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    animation: snow-fall linear infinite;
}

@keyframes snow-fall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Fog particles */
.particle-fog {
    background: radial-gradient(ellipse, rgba(200, 200, 220, 0.3), transparent);
    border-radius: 50%;
    animation: fog-drift linear infinite;
}

@keyframes fog-drift {
    0% {
        transform: translateX(-100%) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(100vw) scale(1.5);
        opacity: 0;
    }
}

/* Heat shimmer particles */
.particle-heat {
    background: radial-gradient(ellipse, rgba(255, 200, 150, 0.2), transparent);
    border-radius: 50%;
    animation: heat-shimmer ease-in-out infinite;
}

@keyframes heat-shimmer {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) scaleY(1.1);
        opacity: 0.6;
    }
}

/* Sand particles */
.particle-sand {
    background: rgba(210, 180, 140, 0.8);
    border-radius: 50%;
    animation: sand-blow linear infinite;
}

@keyframes sand-blow {
    0% {
        transform: translateX(-10vw) translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(110vw) translateY(10px);
        opacity: 0;
    }
}

/* Weather overlay effects */
.scene-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--weather-overlay, transparent);
    pointer-events: none;
    transition: background 2s ease;
    border-radius: inherit;
    z-index: 1;
}

/* Weather-specific body styles */
body.weather-rain .scene-image,
body.weather-thunderstorm .scene-image {
    filter: brightness(0.85) contrast(1.05) saturate(0.9);
}

body.weather-fog .scene-image {
    filter: brightness(0.9) contrast(0.9) blur(1px);
}

body.weather-snow .scene-image,
body.weather-blizzard .scene-image {
    filter: brightness(1.1) saturate(0.8);
}

body.weather-heatwave .scene-image {
    filter: brightness(1.1) saturate(1.2) sepia(0.1);
}

body.weather-sandstorm .scene-image {
    filter: brightness(0.9) sepia(0.3) saturate(0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .weather-display {
        top: 55px;
        right: 5px;
        padding: 6px 10px;
    }
    
    .weather-icon {
        font-size: 20px;
    }
    
    .weather-name {
        font-size: 11px;
    }
    
    .weather-temp {
        font-size: 10px;
    }
    
    .weather-panel-content {
        max-width: 98%;
    }
    
    .weather-big-icon {
        font-size: 40px;
    }
    
    .weather-current-temp {
        font-size: 24px;
    }
}
