* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-top: 10px;
    font-size: 1rem;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
}

.search-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 40px;
}

.search-box form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.plate-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
    text-transform: uppercase;
}

.plate-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn, .submit-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-btn:hover, .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.search-btn:active, .submit-btn:active {
    transform: translateY(0);
}

.info-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.info-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-card {
    text-align: center;
    padding: 20px;
}

.icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.info-card h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

/* Reviews Page Styles */
.plate-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    text-align: center;
}

.plate-number {
    color: #667eea;
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 5px 15px;
    border-radius: 5px;
    display: inline-block;
}

.rating-summary {
    margin-top: 20px;
}

.avg-rating {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.stars {
    color: #ffc107;
}

.rating-number {
    margin-left: 10px;
    font-weight: 600;
    color: #667eea;
}

.review-count {
    color: #666;
    font-size: 0.9rem;
}

.no-reviews {
    color: #999;
    font-style: italic;
    margin-top: 15px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.review-form-section, .reviews-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.review-form-section h3, .reviews-section h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Star Rating */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    font-size: 2rem;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
    color: #ffc107;
}

.submit-btn {
    width: 100%;
}

/* Review Cards */
.review-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
}

.review-rating {
    color: #ffc107;
    font-size: 1.1rem;
}

.review-comment {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.review-date {
    color: #999;
    font-size: 0.85rem;
}

/* Leaderboards */
.leaderboards {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 30px;
}

.leaderboards h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.leaderboard-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.leaderboard-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
}

.leaderboard-title.best {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
}

.leaderboard-title.worst {
    background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
    color: white;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #667eea;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.leaderboard-item .rank {
    font-weight: 700;
    font-size: 1.2rem;
    color: #667eea;
}

.leaderboard-item .plate {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #333;
}

.leaderboard-item .rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.leaderboard-item .rating-number {
    font-weight: 600;
    color: #667eea;
}

.leaderboard-item .review-count {
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

.leaderboard-note {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .search-box, .info-section, .plate-header, .review-form-section, .reviews-section, .leaderboards {
        padding: 20px;
    }
    
    .search-box form {
        flex-direction: column;
    }
    
    .plate-input, .search-btn {
        width: 100%;
    }
    
    .info-grid, .leaderboard-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-item {
        grid-template-columns: 30px 1fr;
        gap: 8px;
    }
    
    .leaderboard-item .rating,
    .leaderboard-item .review-count {
        grid-column: 2;
    }
}
