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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.ad-banner {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background: #e2e8f0;
    border: 2px dashed #a0aec0;
    border-radius: 8px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner::after {
    content: 'Ad Banner (728×90)';
    color: #718096;
    font-size: 14px;
}

.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    display: none;
}

@media (min-width: 1024px) {
    .sidebar {
        display: block;
    }
}

.ad-sidebar {
    width: 300px;
    height: 600px;
    background: #e2e8f0;
    border: 2px dashed #a0aec0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 20px;
}

.ad-sidebar::after {
    content: 'Ad Sidebar (300×600)';
    color: #718096;
    font-size: 14px;
}

.ad-rectangle {
    width: 100%;
    max-width: 300px;
    height: 250px;
    background: #e2e8f0;
    border: 2px dashed #a0aec0;
    border-radius: 8px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-rectangle::after {
    content: 'Ad Rectangle (300×250)';
    color: #718096;
    font-size: 14px;
}

.form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4299e1;
    display: inline-block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 1rem;
}

.optional {
    font-weight: 400;
    color: #a0aec0;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select:disabled {
    background-color: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.form-group input.error,
.form-group select.error {
    border-color: #e53e3e;
}

.loading-hint {
    color: #4299e1;
    font-style: italic;
}

.hint {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: #718096;
}

.submit-btn {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #2b6cb0 0%, #4299e1 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

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

.result-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.verdict-panel {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.verdict-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.verdict-text {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
}

.verdict-safe {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
}

.verdict-borderline {
    background: linear-gradient(135deg, #feebc8 0%, #fbd38d 100%);
    color: #744210;
}

.verdict-unsafe {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
}

.vehicle-info {
    background: #f7fafc;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.vehicle-info p {
    margin: 5px 0;
    font-size: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-card.highlight {
    background: #ebf8ff;
    border-color: #90cdf4;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.stat-value.negative {
    color: #e53e3e;
}

.explanation-panel {
    background: #edf2f7;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.explanation-panel h3 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.explanation-panel p {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.7;
}

.back-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #4a5568 0%, #718096 100%);
    border: none;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 85, 104, 0.3);
}

.error-panel {
    text-align: center;
    padding: 40px;
}

.error-panel h2 {
    color: #e53e3e;
    margin-bottom: 15px;
}

.error-panel p {
    color: #718096;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .form-container,
    .result-container {
        padding: 20px;
    }
    
    .verdict-text {
        font-size: 2.2rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .ad-banner {
        height: 60px;
    }
    
    .ad-banner::after {
        content: 'Ad Banner (Mobile)';
    }
}

@media (max-width: 480px) {
    .page-wrapper {
        padding: 10px;
    }
    
    header {
        padding: 20px 15px;
        border-radius: 8px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
