/* SafeRoad - Modern CSS Styles */

:root {
    --primary: #FCE000;
    --primary-dark: #E5C900;
    --bg-dark: #0D0D0D;
    --bg-card: #1A1A1A;
    --bg-input: #252525;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --success: #22C55E;
    --danger: #EF4444;
    --border-radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, #1A1A1A 0%, #0D0D0D 100%);
}

/* Header */
.header {
    background: var(--bg-card);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-phone {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.input-prefix {
    padding: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 16px 16px 0;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    width: 100%;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 12px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Code Inputs */
.verify-info {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.code-input {
    width: 48px;
    height: 56px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.code-input:focus {
    border-color: var(--primary);
}

.error-message {
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    font-size: 14px;
    text-align: center;
    display: none;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid transparent;
    border-top-color: var(--bg-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Main Content */
.main-content {
    padding: 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: 4px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Plate Input */
.plate-input-container {
    margin-bottom: 20px;
}

.plate-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: white;
    padding: 12px 16px;
    border-radius: var(--border-radius);
}

.region-code-select {
    width: 48px;
    height: 40px;
    background: var(--bg-card);
    border: none;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.plate-char {
    width: 36px;
    height: 40px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    outline: none;
    transition: all 0.2s;
}

.plate-char:focus {
    border-color: var(--primary);
    background: white;
}

.plate-char::placeholder {
    color: #ccc;
}

/* Filters */
.filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-item {
    flex: 1;
}

.filter-item label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.select-input {
    width: 100%;
    background: var(--bg-input);
    border: none;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.select-input option {
    background: var(--bg-card);
}

/* Search Button */
.btn-search {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-dark);
    border: none;
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(252, 224, 0, 0.3);
}

/* Results */
.results-section {
    margin-top: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.results-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-card:hover {
    border-color: rgba(252, 224, 0, 0.3);
    transform: translateX(4px);
}

.plate-number {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
}

.plate-region {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    padding-right: 8px;
    border-right: 2px solid #e0e0e0;
}

.plate-code {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.plate-suffix {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-info {
    text-align: right;
}

.result-status {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.status-available {
    color: var(--success);
}

.status-unavailable {
    color: var(--text-secondary);
}

.result-price {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 16px 0;
}

.btn-page {
    background: var(--bg-input);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 48px 24px;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 400px) {
    .filter-row {
        flex-direction: column;
    }
    
    .plate-char {
        width: 32px;
        height: 36px;
        font-size: 16px;
    }
    
    .code-input {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
}
