body {
    font-family: 'Inter', sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly interactions */
.touch-manipulation {
    touch-action: manipulation;
}

/* Improved mobile input styling */
input[type="date"], input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Better focus states for mobile */
input:focus, button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
}

/* Active states for better touch feedback */
button:active {
    transform: scale(0.98);
}

/* Glass morphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animation classes */
.animated-card {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(30px);
    opacity: 0;
}

.animated-card.show {
    transform: translateY(0);
    opacity: 1;
}

/* Loading spinner */
.loader {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #818cf8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Mobile-specific optimizations */
@media (max-width: 640px) {
    .glass-card {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    /* Reduce light rays intensity on mobile for better performance */
    .light-rays-container canvas {
        opacity: 0.3;
    }
    
    /* Ensure minimum touch target size */
    button, input {
        min-height: 44px;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 896px) and (orientation: landscape) {
    .container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    header {
        margin-bottom: 1.5rem;
    }
    
    footer {
        margin-top: 2rem;
    }
}

/* Usage level indicators */
.usage-low { 
    border-left-color: #22c55e; 
}

.usage-medium { 
    border-left-color: #f59e0b; 
}

.usage-high { 
    border-left-color: #ef4444; 
}

.text-low {
    color: #555555;
}

.text-medium {
    color: #f59e0b;
}

.text-high {
    color: #ef4444;
}