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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.5;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.header {
    background: #ffff00;
    color: black;
    padding: 24px 30px;
    position: relative;
    border-bottom: 3px solid #4a5568;
}

.back-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    color: rgb(85, 85, 85);
    border: 1px solid #3b82f6;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.back-button:hover {
    background: #3b82f6;
    color: white;
    border-color: #1f5fc5;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.header p {
    opacity: 0.8;
    font-size: 15px;
    color: #000000;
}

.form-container {
    padding: 30px;
}

.intro-section {
    margin-bottom: 25px;
    padding: 16px;
    background: #f7fafc;
    border-left: 4px solid #4299e1;
    border-radius: 4px;
}

.intro-section p {
    color: #4a5568;
    margin: 0;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.search-btn {
    width: 100%;
    padding: 12px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background: #2563eb;
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #9ca3af;
}

.stop-btn {
    width: 100%;
    padding: 12px 16px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
    display: none;
}

.stop-btn:hover {
    background: #b91c1c;
}

.progress-container {
    display: none;
    padding: 24px 30px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    color: #6b7280;
    margin-bottom: 8px;
    font-size: 14px;
}

.current-plate {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 1px;
}

.results-container {
    display: none;
    padding: 24px 30px;
    border-top: 1px solid #e5e7eb;
}

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

.results-count {
    font-size: 18px;
    color: #374151;
    font-weight: 500;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

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

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .header {
        padding: 20px;
    }
    
    .form-container {
        padding: 20px;
    }
}

.result-item {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
}

.result-item:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.result-item::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 16px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    transition: background 0.2s;
}

.result-item:hover::after {
    background: #3b82f6;
}

.registration {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.vehicle-details {
    color: #4b5563;
    line-height: 1.4;
    font-size: 14px;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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