/* Welcome Screen - New Design */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a2540 0%, #1a365d 50%, #2d5a8c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.welcome-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 20px;
}

/* Logo */
.welcome-logo {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.welcome-logo img {
    max-width: 250px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Sunrise/Sunset Animation */
.sunrise-animation {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 0 auto 40px;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.sun-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 50%;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 60px rgba(255, 107, 53, 0.6);
    animation: sunrise 3s ease-in-out infinite;
}

.sun-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 8s linear infinite;
}

.sun-rays::before,
.sun-rays::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 107, 53, 0.8), transparent);
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.sun-rays::after {
    transform: translateX(-50%) rotate(90deg);
}

.horizon-line {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.solar-panel-silhouette {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.panel {
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(247, 147, 30, 0.3));
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: perspective(100px) rotateX(20deg);
    animation: panelGlow 2s ease-in-out infinite;
}

.panel:nth-child(2) {
    animation-delay: 0.3s;
}

.panel:nth-child(3) {
    animation-delay: 0.6s;
}

/* Battery Charging Animation */
.battery-charging {
    position: relative;
    width: 150px;
    height: 80px;
    margin: 0 auto 40px;
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.battery-container {
    position: relative;
    width: 120px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin: 0 auto;
    overflow: hidden;
}

.battery-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #4ade80, #22c55e);
    animation: batteryCharge 3s ease-in-out infinite;
}

.battery-tip {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 4px 4px 0;
}

.charging-bolt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    color: #fbbf24;
    animation: boltPulse 1s ease-in-out infinite;
}

/* Welcome Text */
.welcome-text {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease-out 0.9s backwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 1.2s backwards;
    color: rgba(255, 255, 255, 0.9);
}

/* Progress Bar */
.welcome-progress {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 auto 15px;
    overflow: hidden;
    animation: fadeIn 1s ease-out 1.5s backwards;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b35, #f7931e, #fbbf24);
    border-radius: 10px;
    animation: progressLoad 3s ease-out forwards;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.loading-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    animation: fadeIn 1s ease-out 1.8s backwards;
}

/* Keyframe Animations */
@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes sunPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(300%);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Slide Animations */
.animate-fade-in {
    animation: fadeInUp 1s ease-in-out 0.5s backwards;
}

.animate-fade-in-delay {
    animation: fadeInUp 1s ease-in-out 0.8s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s ease-in-out 1.1s backwards;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

.slide-in-right {
    animation: slideInRight 1s ease-out;
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoomIn 0.8s ease-out;
}

/* New Keyframe Animations */
@keyframes sunrise {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        box-shadow: 0 0 60px rgba(255, 107, 53, 0.6);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
        box-shadow: 0 0 80px rgba(255, 107, 53, 0.8);
    }
}

@keyframes panelGlow {
    0%, 100% {
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(247, 147, 30, 0.3));
    }
    50% {
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.6), rgba(247, 147, 30, 0.6));
    }
}

@keyframes batteryCharge {
    0% {
        height: 0%;
    }
    100% {
        height: 100%;
    }
}

@keyframes boltPulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes progressLoad {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
