body { 
    background-color: #f4f7f9; 
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x: hidden;
}

.app-main {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 8px;
    box-sizing: border-box;
}

.plate-card {
    background: #fff;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 650px;
    box-sizing: border-box;
}

/* Tabs */
.nav-pills {
    background: #f1f3f5;
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 35px;
}
.nav-pills .nav-link {
    color: #555;
    font-weight: 700;
    border-radius: 12px;
    padding: 12px;
}
.nav-pills .nav-link.active {
    background-color: #222;
    color: #fff;
}

/* Plate Box - Asosiy ramka */
.plate-container {
    display: flex;
    align-items: center;
    background: #fff;
    border: 5px solid #000;
    border-radius: 18px;
    height: 110px;
    width: 100%;
    max-width: 100%;
    position: relative;
    padding: 0 10px;
    box-sizing: border-box;
}

.bolt {
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Viloyat kodi qismi (Chap) */
.region-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 5px solid #000;
    height: 75%;
    width: 100px; /* Viloyat kodi uchun aniq joy */
    flex-shrink: 0;
}

.region-box input {
    width: 100%;
    min-width: 0;
    font-size: 3.5rem;
    font-weight: 900;
    border: none;
    outline: none;
    text-align: center;
    font-family: 'Arial Black', sans-serif;
}

/* Raqam va Harflar qismi (O'rta) */
.main-content-box {
    flex-grow: 1;
    flex-shrink: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    min-width: 0;
}

.main-content-box input {
    width: 100%;
    min-width: 0;
    font-size: 3rem;
    font-weight: 900;
    border: none;
    outline: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Arial Black', sans-serif;
}

/* Bayroq va UZ (O'ng) */
.flag-box {
    width: 80px; /* Bayroq uchun aniq joy */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flag {
    width: 42px;
    height: 24px;
    border: 1px solid #ddd;
    background: linear-gradient(to bottom, #0099b5 33.3%, #fff 33.3%, #fff 66.6%, #1eb53a 66.6%);
    margin-bottom: 4px;
}

.uz-label {
    font-weight: 900;
    color: #003366;
    font-size: 1.6rem;
    line-height: 1;
}

/* Mobil qurilmalar uchun (planshet va kichik ekranlar) */
@media (max-width: 576px) {
    body { padding: 0 12px; }
    .plate-card { padding: 24px 16px; }
    .nav-pills .nav-link { padding: 10px 8px; font-size: 0.9rem; }
    .plate-container {
        height: 85px;
        padding: 0 6px;
        border-width: 4px;
    }
    .bolt { width: 10px; height: 10px; }
    .region-box {
        width: 55px;
        border-right-width: 4px;
    }
    .region-box input { font-size: 2rem; }
    .main-content-box {
        padding: 0 8px;
    }
    .main-content-box input {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    .flag-box { width: 50px; }
    .flag { width: 28px; height: 16px; margin-bottom: 2px; }
    .uz-label { font-size: 0.95rem; }
    .badge { font-size: 0.8rem !important; padding: 6px 12px !important; }
    .d-flex.gap-3 { gap: 12px !important; flex-wrap: wrap; }
    .d-flex.gap-3 .btn { font-size: 1rem !important; padding: 12px 8px !important; }
}

/* Juda kichik ekranlar (iPhone 12 Pro 390px, iPhone SE va boshqalar) */
@media (max-width: 400px) {
    body { padding: 0 8px; }
    .plate-card { padding: 16px 12px; }
    .plate-container {
        height: 72px;
        padding: 0 4px;
        border-width: 3px;
        border-radius: 12px;
    }
    .bolt { width: 8px; height: 8px; }
    .region-box {
        width: 42px;
        min-width: 42px;
        border-right-width: 3px;
    }
    .region-box input { font-size: 1.5rem; }
    .main-content-box {
        padding: 0 6px;
        min-width: 130px;
    }
    .main-content-box input {
        font-size: clamp(2rem, 4.5vw, 1.4rem);
        letter-spacing: 0.5px;
    }
    .flag-box { width: 38px; min-width: 38px; }
    .flag { width: 22px; height: 12px; }
    .uz-label { font-size: 0.8rem; }
}