/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 0;
    color: white;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
.main {
    max-width: 800px;
    margin: 0 auto;
}

/* Search section */
.search-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.search-input {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.search-btn.loading .btn-text {
    display: none;
}

.search-btn.loading .spinner {
    display: block;
}

/* Results section */
.results {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    animation: slideUp 0.4s ease-out;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.plate-display {
    background: #1f2937;
    color: #fbbf24;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border: 3px solid #fbbf24;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #e5e7eb;
    transition: all 0.2s ease;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.power-highlight {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border-left-color: #f59e0b;
}

.power-highlight .info-value {
    color: #92400e;
    font-weight: 700;
    font-size: 1.3rem;
}

.info-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

/* Power comparison */
.power-comparison {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.power-comparison h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.power-bar {
    position: relative;
    height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.power-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    transition: width 1s ease-out;
    position: relative;
}

.power-markers {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.power-description {
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
    margin-top: 1rem;
}

/* Error section */
.error {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    animation: slideUp 0.4s ease-out;
}

.error-card {
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-card h3 {
    font-size: 1.5rem;
    color: #dc2626;
    margin-bottom: 1rem;
}

.error-card p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.retry-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Info section */
.info-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.info-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #1f2937;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.info-card p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    opacity: 0.8;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer small {
    opacity: 0.7;
}

/* Utility classes */
.hidden {
    display: none;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-section,
    .results,
    .error,
    .info-section {
        padding: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .plate-display {
        font-size: 1rem;
    }
    
    .power-markers {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .search-section,
    .results,
    .error,
    .info-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .search-input {
        font-size: 1rem;
    }
    
    .search-btn {
        font-size: 1rem;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
}
