.battery-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.battery-icon-wrapper {
    position: relative;
    display: inline-block;
}

.battery-icon {
    width: 120px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.battery-level {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 4px;
    transition: width 0.5s ease, background 0.3s ease;
}

.battery-level.low {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.battery-level.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    animation: pulse-battery 1s infinite;
}

.battery-terminal {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 4px 4px 0;
}

.charging-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: charging-pulse 1.5s ease-in-out infinite;
}

.charging-bolt {
    filter: brightness(0) invert(1);
    drop-shadow: 0 0 8px rgba(255, 255, 255, 0.8));
}

@keyframes charging-pulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes pulse-battery {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.battery-percentage {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

.percentage-value {
    display: inline-block;
    min-width: 120px;
}

.battery-status .badge {
    font-size: 1rem;
    padding: 8px 16px;
}

.info-card {
    padding: 1rem;
    background: var(--bs-light);
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
    text-align: center;
}

[data-bs-theme="dark"] .info-card {
    background: #1f1f1f;
}

.info-card .form-label {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.health-indicator {
    padding: 1rem;
    background: var(--bs-light);
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .health-indicator {
    background: #1f1f1f;
}

.health-bar {
    width: 100%;
    height: 30px;
    background: var(--bs-secondary-bg);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.health-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 15px;
    transition: width 0.5s ease, background 0.3s ease;
    position: relative;
}

.health-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.health-fill.good {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.health-fill.fair {
    background: linear-gradient(90deg, #eab308 0%, #ca8a04 100%);
}

.health-fill.poor {
    background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
}

.health-fill.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.health-status {
    text-align: center;
}

.health-status .badge {
    font-size: 0.9rem;
    padding: 6px 12px;
}

/* Chart container */
#batteryChart {
    max-height: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .battery-icon {
        width: 100px;
        height: 50px;
    }

    .battery-terminal {
        width: 6px;
        height: 24px;
        right: -6px;
    }

    .battery-percentage {
        font-size: 2.5rem;
    }

    .info-value {
        font-size: 1.25rem;
    }

    .charging-bolt {
        height: 20px;
        width: 20px;
    }
}

/* Status badges colors */
.badge.bg-charging {
    background: #22c55e !important;
}

.badge.bg-discharging {
    background: #f59e0b !important;
}

.badge.bg-full {
    background: #10b981 !important;
}

.badge.bg-low {
    background: #ef4444 !important;
}

/* Animation for refresh button */
#refreshBtn:active .fsvg {
    animation: spin 0.5s ease;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
