﻿:root {
    --primary: #FFCC01;
    --primary-dark: #E6B800;
    --secondary: #1D1D1D;
    --accent: #FFCC01;
    --light: #F5F5F5;
    --dark: #1D1D1D;
    --white: #FFFFFF;
    --gray-light: #E0E0E0;
    --gray-medium: #A2A2A2;
    --text-light: #B8B8B8;
    --text-dark: #1D1D1D;
    --bg-glass: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1D1D1D, #2C2C2C);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
}

    body.lang-fa {
        font-family: 'IRANSans', 'Vazir', 'Segoe UI', sans-serif;
    }

/* ===== PARTICLES BACKGROUND ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

    .particles canvas {
        display: block;
        width: 100%;
        height: 100%;
    }

/* ===== LANGUAGE SELECTOR ===== */
.language-selector {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 18px;
    border-radius: 30px;
    color: var(--white);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    user-select: none;
    -webkit-user-select: none;
}

    .language-selector:hover {
        background: rgba(255, 204, 1, 0.15);
        border-color: var(--primary);
    }

    .language-selector i {
        font-size: 16px;
    }

    .language-selector .lang-code {
        font-size: 14px;
        font-weight: 500;
    }

    .language-selector .fa-chevron-down {
        transition: transform 0.3s ease;
    }

    .language-selector.active .fa-chevron-down {
        transform: rotate(180deg);
    }

.language-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(29, 29, 29, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 160px;
    display: none;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: dropdownFadeIn 0.2s ease;
}

.language-selector.active .language-dropdown {
    display: block !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.language-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    cursor: pointer;
}

    .language-dropdown a:hover,
    .language-dropdown a:focus {
        background: rgba(255, 204, 1, 0.1);
        color: var(--white);
        outline: none;
    }

    .language-dropdown a:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: -2px;
    }

/* ===== MAIN CONTAINER ===== */
.login-container {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 204, 1, 0.15);
    padding: 40px;
    width: 600px;
    max-width: 95%;
    transition: all 0.5s ease;
    min-height: auto;
    margin: 80px auto 40px;
    overflow: hidden;
}

    .login-container::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(to bottom right, transparent, transparent, transparent, rgba(255, 204, 1, 0.08));
        transform: rotate(30deg);
        animation: animate 8s linear infinite;
        z-index: -1;
    }

@keyframes animate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== LOGO ===== */
.logo {
    text-align: center !important;
    margin-bottom: 25px;
}

    .logo img {
        display: block;
        margin: 0 auto 10px;
    }

    .logo h1 {
        font-size: 24px;
        font-weight: 600;
        color: var(--white);
        margin-bottom: 5px;
        text-align: center !important;
    }

    .logo p {
        color: var(--text-light);
        font-size: 14px;
        text-align: center !important;
    }

/* ===== MAIN TABS ===== */
.main-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

    .tab-btn:hover {
        color: var(--white);
        background: rgba(255, 255, 255, 0.05);
    }

    .tab-btn.active {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: var(--secondary);
        box-shadow: 0 4px 15px rgba(255, 204, 1, 0.25);
    }

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

    .tab-content.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INPUT GROUPS ===== */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

    .input-group label {
        display: block;
        color: var(--text-light);
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 300;
    }

    .input-group input[type="text"],
    .input-group input[type="password"],
    .input-group textarea {
        width: 100%;
        padding: 14px 20px 14px 45px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        color: var(--white);
        font-size: 15px;
        transition: all 0.3s ease;
        font-family: inherit;
    }

    .input-group textarea {
        resize: vertical;
        min-height: 80px;
        padding: 14px 20px 14px 45px;
    }

        .input-group input:focus,
        .input-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 10px rgba(255, 204, 1, 0.2);
        }

        .input-group input::placeholder,
        .input-group textarea::placeholder {
            color: rgba(255, 255, 255, 0.25);
        }

    .input-group i {
        position: absolute;
        left: 15px;
        bottom: 14px;
        color: rgba(255, 255, 255, 0.4);
        font-size: 16px;
    }

    .input-group textarea + i {
        bottom: auto;
        top: 40px;
    }

/* ===== CHECKBOX GROUP ===== */
.checkbox-group label:first-child {
    margin-bottom: 10px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    color: var(--text-light);
    font-size: 13px;
}

    .checkbox-item:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 204, 1, 0.2);
    }

    .checkbox-item input[type="checkbox"] {
        accent-color: var(--primary);
        width: 18px;
        height: 18px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .checkbox-item span {
        cursor: pointer;
    }

.sub-options {
    background: rgba(255, 204, 1, 0.04);
    border-radius: 10px;
    padding: 15px 15px 5px 15px;
    border-left: 3px solid var(--primary);
}

    .sub-options .checkbox-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

/* ===== INFO MESSAGE ===== */
.info-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 204, 1, 0.08);
    border-radius: 10px;
    border-left: 3px solid var(--primary);
    margin: 20px 0;
}

    .info-message i {
        color: var(--primary);
        font-size: 20px;
        flex-shrink: 0;
    }

    .info-message span {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        line-height: 1.4;
    }

.alt-line {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
}

    .alt-line:hover {
        background: rgba(255, 255, 255, 0.06);
    }

/* ===== BUTTONS ===== */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    color: var(--secondary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 204, 1, 0.25);
    font-family: inherit;
}

    .login-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(255, 204, 1, 0.35);
    }

    .login-btn:active {
        transform: translateY(0);
    }

/* ===== TRACK SECTION ===== */
.track-container {
    padding: 10px 0;
}

.track-result {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.06);
}

    .track-result.has-data {
        border-style: solid;
        border-color: rgba(255, 204, 1, 0.2);
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .track-result .track-item {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.7);
        font-size: 14px;
    }

        .track-result .track-item:last-child {
            border-bottom: none;
        }

        .track-result .track-item strong {
            color: var(--white);
            display: inline-block;
            min-width: 120px;
        }

/* ================================================================
   ===== مودال تأیید کد (Verification Modal) =====
   ================================================================ */

#verificationModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease;
}

    #verificationModal.show {
        display: flex;
    }

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.verification-box {
    background: var(--secondary);
    padding: 40px 35px;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 204, 1, 0.2);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 204, 1, 0.05);
    animation: slideUp 0.4s ease;
    position: relative;
    background: linear-gradient(145deg, #1a1a2e, #2a2a4a);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.verification-box h3 {
    color: var(--white);
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.verification-box p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 25px;
}

.verification-code-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.verification-code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--white);
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

    .verification-code-input:focus {
        border-color: var(--primary);
        background: rgba(255, 204, 1, 0.08);
        box-shadow: 0 0 20px rgba(255, 204, 1, 0.15);
    }

    .verification-code-input:disabled {
        opacity: 0.4;
    }

.countdown {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    margin: 15px 0;
    font-family: monospace;
    letter-spacing: 2px;
}

.verify-btn,
.resend-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: inherit;
}

.verify-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    box-shadow: 0 4px 15px rgba(255, 204, 1, 0.25);
}

    .verify-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 204, 1, 0.35);
    }

    .verify-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.resend-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

    .resend-btn:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.12);
        color: var(--white);
    }

    .resend-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    line-height: 1;
}

    .close-modal:hover {
        color: var(--white);
    }

/* ===== واکنش‌گرایی مودال ===== */
@media (max-width: 480px) {
    .verification-box {
        padding: 30px 20px;
    }

    .verification-code-input {
        width: 40px;
        height: 50px;
        font-size: 22px;
        gap: 8px;
    }

    .verification-code-container {
        gap: 8px;
    }
}

@media (max-width: 380px) {
    .verification-code-input {
        width: 34px;
        height: 44px;
        font-size: 18px;
    }

    .verification-code-container {
        gap: 6px;
    }
}

/* ===== RTL برای مودال ===== */
body[dir="rtl"] .close-modal {
    right: auto;
    left: 20px;
}

/* مهم: در RTL ورودی‌های کد باید چپ‌چین باشند تا اعداد به درستی وارد شوند */
body[dir="rtl"] .verification-code-container {
    direction: ltr !important;
}

body[dir="rtl"] .verification-code-input {
    direction: ltr !important;
    text-align: center !important;
}

/* ===== RTL OVERRIDES ===== */
body[dir="rtl"] .input-group i {
    left: auto;
    right: 15px;
}

body[dir="rtl"] .input-group input,
body[dir="rtl"] .input-group textarea {
    padding-left: 20px;
    padding-right: 45px;
}

body[dir="rtl"] .checkbox-item {
    flex-direction: row-reverse;
}

    body[dir="rtl"] .checkbox-item input[type="checkbox"] {
        margin-left: 10px;
        margin-right: 0;
    }

body[dir="rtl"] .info-message {
    flex-direction: row-reverse;
    border-left: none;
    border-right: 3px solid var(--primary);
}

body[dir="rtl"] .language-selector {
    right: auto;
    left: 30px;
}

body[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

body[dir="rtl"] .main-tabs {
    flex-direction: row-reverse;
}

body[dir="rtl"] .checkbox-grid {
    direction: rtl;
}

body[dir="rtl"] .sub-options .checkbox-grid {
    direction: rtl;
}

body[dir="rtl"] .logo h1,
body[dir="rtl"] .logo p,
body[dir="rtl"] .input-group label,
body[dir="rtl"] .checkbox-item span,
body[dir="rtl"] .info-message span,
body[dir="rtl"] .track-result,
body[dir="rtl"] .signup-link {
    text-align: right;
}

body[dir="rtl"] .logo h1,
body[dir="rtl"] .logo p {
    text-align: center !important;
}

/* ===== LOCATION SECTION ===== */
.location-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

    .location-section > label {
        display: block;
        color: var(--text-light);
        margin-bottom: 12px;
        font-size: 14px;
        font-weight: 300;
    }

.location-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.location-status {
    font-size: 13px;
    color: var(--text-light);
    min-width: 150px;
}

    .location-status .fa-spinner {
        color: var(--primary);
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.map-container {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

    .map-container .leaflet-control-attribution {
        font-size: 9px;
        background: rgba(0, 0, 0, 0.5);
        color: rgba(255, 255, 255, 0.6);
    }

        .map-container .leaflet-control-attribution a {
            color: rgba(255, 255, 255, 0.8);
        }

.bts-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 12px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .legend-dot.bts-4g {
        background: #2ECC71;
    }

    .legend-dot.bts-5g {
        background: #9B59B6;
    }

    .legend-dot.user-location {
        background: #FF4444;
        box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
    }

.custom-user-marker {
    z-index: 1000;
}

.bts-marker {
    z-index: 500;
}

@media (max-width: 600px) {
    .location-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .map-container {
        height: 220px;
    }
}

@media (max-width: 400px) {
    .map-container {
        height: 180px;
    }
}

.bts-2g .legend-dot,
.legend-dot.bts-2g {
    background: #95A5A6; /* خاکستری */
    border-color: #7F8C8D;
}

.bts-3g .legend-dot,
.legend-dot.bts-3g {
    background: #2ECC71; /* سبز */
    border-color: #27AE60;
}

.bts-4g .legend-dot,
.legend-dot.bts-4g {
    background: #3498DB; /* آبی */
    border-color: #2980B9;
}

.bts-5g .legend-dot,
.legend-dot.bts-5g {
    background: #E67E22; /* نارنجی */
    border-color: #D35400;
}

/* ===== موقعیت کاربر ===== */
.user-location .legend-dot,
.legend-dot.user-location {
    background: #FF4444; /* قرمز */
    border-color: #CC0000;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
}


/* ===== حالت موفقیت در مودال ===== */
.success-content {
    text-align: center;
    padding: 10px 0;
}

.success-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 15px;
    animation: successPulse 0.8s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.close-success-btn {
    background: linear-gradient(135deg, #FFCC01, #E6B800) !important;
    color: #1D1D1D !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    box-shadow: 0 4px 15px rgba(255, 204, 1, 0.25) !important;
}

    .close-success-btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 25px rgba(255, 204, 1, 0.35) !important;
    }


