/* =========================
   🌟 Energy Module - Bottom Image Layout
========================= */

.energy-download-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* Header: Title + Bar + Button */
.energy-header {
    text-align: center;
    padding-bottom: 20px;
}

.energy-heading {
    font-size: 24px;
    color: #004aad;
    font-weight: 700;
    margin-bottom: 20px;
}

.energy-download-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    display: none;
    margin: 20px auto 0;      /* ✅ center horizontally */
    max-width: 600px;         /* ✅ same as .energy-image-section */
    width: 100%;
}


.energy-download-bar.glow::after {
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #00d4ff, #0077ff);
    animation: downloadFlow linear forwards;
    border-radius: 6px;
}

@keyframes downloadFlow {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.download-button {
    background: #00c2ff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.download-button:hover {
    background: #007fff;
}

.download-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* Background Image + Rays Wrapper */
.energy-image-section {
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    height: 500px;
    position: relative;
    overflow: hidden;
    margin: 20px auto 0;
    max-width: 600px; /* ✅ limit width to image */
}

/* Energy Rays - Contained */
.energy-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;       /* ✅ full width of .energy-image-section only */
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: none;
    overflow: hidden;
}

/* Each Ray */
.energy-ray {
    position: absolute;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 255, 255, 0.15), rgba(0, 255, 204, 0.5), transparent);
    animation: energyFall 3s linear infinite;
    border-radius: 1px;
    opacity: 0.6;
    mix-blend-mode: screen;
}


@keyframes energyFall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Energy Glow (optional, not yet used) */
.energy-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(0, 153, 255, 0.5) 0%, rgba(0, 153, 255, 0) 80%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.energy-glow.active {
    opacity: 1;
    animation: pulse 1.5s infinite ease-in-out alternate;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* 📱 Responsive Styles */
@media (max-width: 768px) {
    .energy-heading {
        font-size: 20px;
    }

    .download-button {
        font-size: 14px;
        padding: 10px 20px;
    }

    .energy-download-bar {
        width: 90%;
    }

    .energy-image-section {
        height: 350px;
    }
}

#energy-countdown-container svg circle#energy-ring {
    filter: drop-shadow(0 0 6px #00d4ff);
}


.energy-image-section.pulse-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 212, 255, 0.2), transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes glowPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.4;
    }
}

.energy-progress-circle {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(#00cfff 0%, #e0e0e0 0%);
    box-shadow: 0 0 12px #00cfff;
    margin: 20px auto;
    transition: background 0.3s linear;
}

.energy-progress-circle .inner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #004aad;
}


.energy-log-wrapper {
    margin-top: 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.energy-log-heading {
    font-size: 20px;
    color: #004aad;
    margin-bottom: 15px;
}

.energy-log-table table {
    width: 100%;
    border-collapse: collapse;
}

.energy-log-table th, .energy-log-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.energy-log-table th {
    background: #e9f5ff;
    color: #004aad;
}
