/* Enhanced Minecraft UI Styling */

/* Smooth Transitions for All Elements */
* {
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-sizing: border-box;
}

/* Enhanced Body Background */
body.minecraft-bg {
    background-attachment: fixed;
    background-size: 64px 64px;
    animation: subtle-float 20s ease-in-out infinite alternate;
}

@keyframes subtle-float {
    0% { background-position: 0 0; }
    100% { background-position: 10px 10px; }
}

/* Improved Container Styling */
.container {
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 
                inset 0 0 20px rgba(255, 204, 0, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.container:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 
                inset 0 0 25px rgba(255, 204, 0, 0.15);
    transform: translateY(-5px);
}

/* Modern Button Styling */
.minecraft-button {
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.minecraft-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.minecraft-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.minecraft-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.minecraft-button:hover::after {
    opacity: 1;
}

/* Enhanced Weather Control Panel */
.minecraft-control-panel {
    display: flex;
    gap: 15px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 204, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 3px solid rgba(255, 204, 0, 0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    transform: translateZ(0);
}

.minecraft-control-panel:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 204, 0, 0.3);
    border-color: rgba(255, 204, 0, 0.6);
    transform: translateY(-5px) translateZ(0);
}

.weather-button {
    position: relative;
    overflow: hidden;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background-color: rgba(50, 50, 50, 0.8);
    border: 2px solid rgba(255, 204, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(80, 80, 80, 0.7), rgba(40, 40, 40, 0.7));
    border: 2px solid rgba(100, 100, 100, 0.4);
}

.weather-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 8px 8px 0 0;
}

.weather-button img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(1.2);
    transition: all 0.3s ease;
}

.weather-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.5);
    border-color: rgba(255, 204, 0, 0.8);
}

.weather-button:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 6px rgba(255, 204, 0, 0.7)) brightness(1.3);
}

.weather-button.active {
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.4), rgba(200, 160, 0, 0.4));
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 204, 0, 0.6);
    transform: translateY(-3px);
}

.weather-button.active img {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

/* Enhanced Tooltip */
.tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.minecraft-button:hover .tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Tabs */
.minecraft-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
}

.tab {
    padding: 12px 25px;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--minecraft-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab:hover::before,
.tab.active::before {
    transform: scaleX(1);
}

.tab:hover {
    background: linear-gradient(to bottom, rgba(50, 50, 50, 0.8), rgba(30, 30, 30, 0.8));
    color: #fff;
}

.tab.active {
    background: linear-gradient(to bottom, rgba(60, 60, 60, 0.9), rgba(40, 40, 40, 0.9));
    color: var(--minecraft-accent);
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.3);
}

/* Enhanced Animations for Elements */
.banner-title, .section-title, .minecraft-3d-text {
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(255, 204, 0, 0.5); }
    100% { text-shadow: 0 0 15px rgba(255, 204, 0, 0.8); }
}

/* Smooth Particle Effects */
.particle {
    filter: blur(1px);
    opacity: 0.7;
    transition: all 0.5s ease;
}

/* Enhanced Banner */
.minecraft-banner {
    transition: all 0.5s ease;
}

.minecraft-banner:hover {
    filter: brightness(1.1);
}

/* Improved Toast Notifications */
#minecraft-toast {
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--minecraft-accent);
    border-radius: 5px;
    padding: 10px 15px;
    color: white;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10000;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    font-family: 'Minecraftia', 'Press Start 2P', monospace;
    font-size: 14px;
    text-align: center;
    min-width: 200px;
    backdrop-filter: blur(5px);
}

#minecraft-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Weather Effects Styling */
.weather-container {
    transition: background-color 1s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

/* Enhanced Raindrop Styling */
.raindrop {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(200, 200, 255, 0.8));
    filter: blur(1px);
    opacity: 0.7;
    border-radius: 0 0 2px 2px;
    animation: rain-fall 1s linear infinite;
    pointer-events: none;
}

@keyframes rain-fall {
    0% { transform: translateY(-100px); }
    100% { transform: translateY(calc(100vh + 20px)); }
}

/* Raindrop Splash Effect */
.raindrop-splash {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(200, 200, 255, 0.5);
    border-radius: 50%;
    animation: splash 0.3s ease-out forwards;
    pointer-events: none;
}

@keyframes splash {
    0% { transform: scale(0); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.6; }
    100% { transform: scale(2); opacity: 0; }
}

/* Enhanced Lightning Effects */
.lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001;
    transition: background-color 0.1s ease-in-out;
}

.lightning.flash {
    animation: lightning-flash 1s ease-out;
}

@keyframes lightning-flash {
    0%, 100% { background-color: rgba(255, 255, 255, 0); }
    10%, 90% { background-color: rgba(255, 255, 255, 0.1); }
    50% { background-color: rgba(255, 255, 255, 0.8); }
}

/* Lightning Bolt Effect */
.lightning-bolt {
    position: absolute;
    top: 0;
    width: 3px;
    height: 60%;
    background: rgba(255, 255, 255, 0.9);
    filter: blur(1px);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(200, 200, 255, 0.8);
    animation: lightning-bolt 0.2s ease-in-out;
    transform-origin: top center;
    z-index: 1002;
}

.lightning-branch {
    height: 30%;
    width: 2px;
    transform: rotate(-30deg);
    animation: lightning-branch 0.15s ease-in-out;
}

@keyframes lightning-bolt {
    0% { opacity: 0; height: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes lightning-branch {
    0% { opacity: 0; width: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}

/* Thunder Rumble Effect */
.thunder-rumble {
    animation: rumble 0.8s ease-in-out;
}

@keyframes rumble {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px) rotate(-0.2deg); }
    20% { transform: translateX(2px) rotate(0.2deg); }
    30% { transform: translateX(-1px) rotate(-0.1deg); }
    40% { transform: translateX(1px) rotate(0.1deg); }
    50% { transform: translateX(-1px) rotate(-0.1deg); }
    60% { transform: translateX(1px) rotate(0.1deg); }
    70% { transform: translateX(-1px) rotate(-0.1deg); }
    80% { transform: translateX(1px) rotate(0.1deg); }
    90% { transform: translateX(-1px) rotate(-0.1deg); }
}

/* Improved Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 204, 0, 0.3);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 204, 0, 0.5);
}

/* Responsive Design Media Queries */
@media screen and (max-width: 1200px) {
    .container {
        width: 95%;
        max-width: 1100px;
        padding: 15px;
    }
    
    .minecraft-3d-text {
        font-size: 2.5rem;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-content {
        padding: 20px;
    }
}

@media screen and (max-width: 992px) {
    .container {
        width: 90%;
        padding: 10px;
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .minecraft-3d-text {
        font-size: 2rem;
    }
    
    .stages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stats-container {
        flex-wrap: wrap;
    }
    
    .stats-item {
        flex: 0 0 48%;
        margin-bottom: 15px;
    }
    
    .banner-icons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .banner-icon {
        margin: 5px;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        width: 95%;
        padding: 10px;
    }
    
    .banner-title {
        font-size: 1.8rem;
    }
    
    .banner-subtitle {
        font-size: 0.9rem;
    }
    
    .minecraft-3d-text {
        font-size: 1.8rem;
    }
    
    .minecraft-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .participants-legend {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .legend-item {
        margin: 5px;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .stats-item {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .banner-decoration {
        display: none;
    }
    
    .floating-item {
        transform: scale(0.7);
    }
    
    .participants-header {
        flex-direction: column;
    }
    
    .header-content {
        margin: 10px 0;
    }
    
    .header-gem {
        margin: 5px auto;
    }
}

@media screen and (max-width: 576px) {
    body {
        font-size: 12px;
    }
    
    .container {
        width: 100%;
        padding: 8px;
    }
    
    .banner-title {
        font-size: 1.5rem;
    }
    
    .banner-subtitle {
        font-size: 0.8rem;
    }
    
    .minecraft-3d-text {
        font-size: 1.5rem;
    }
    
    .stages-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-image img {
        max-width: 100%;
        height: auto;
    }
    
    .participants-header {
        flex-direction: column;
    }
    
    .header-content {
        text-align: center;
    }
    
    .banner-content {
        padding: 15px 10px;
    }
    
    .floating-particles {
        display: none;
    }
    
    .minecraft-logo {
        font-size: 1.2rem;
    }
    
    .top-bar {
        padding: 5px;
    }
    
    .weather-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .weather-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
}
