* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #e82127 0%, #ff4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: #999;
    font-size: 1rem;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.battery-icon {
    width: 150px;
    height: 80px;
    margin: 0 auto 30px;
    border: 4px solid #ffffff;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 30px;
    background: #ffffff;
    border-radius: 0 4px 4px 0;
}

.battery-fill {
    height: 100%;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    transition: width 0.6s ease, background 0.3s ease;
    width: 0%;
}

.battery-fill.low {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.battery-fill.medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.charge-info {
    text-align: center;
    margin-bottom: 30px;
}

.charge-info h2 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.charge-label {
    color: #999;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.details {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.detail-label {
    color: #999;
}

.detail-value {
    font-weight: 600;
}

.refresh-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e82127 0%, #ff4444 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(232, 33, 39, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #e82127;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .charge-info h2 {
        font-size: 3rem;
    }
    
    .card {
        padding: 30px 20px;
    }
}
