/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100vh;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.65)),
        url("../../images/gta-v3.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================
   HEADER
========================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 2000;
}

.logo {
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow:
        0 0 5px rgba(255, 0, 170, 0.8),
        0 0 12px rgba(255, 0, 170, 0.8),
        0 0 25px rgba(255, 0, 170, 0.7),
        0 0 45px rgba(180, 0, 255, 0.5);
    animation: logoGlow 2.2s ease-in-out infinite alternate;
    transition: transform 0.3s ease;
    z-index: 2001;
    filter: none !important;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    filter: none !important;
}

.logo .spark {
    filter: none !important;
}

@keyframes logoGlow {
    0% {
        text-shadow: 0 0 4px rgba(255, 0, 170, 0.5), 0 0 10px rgba(255, 0, 170, 0.4), 0 0 20px rgba(180, 0, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 7px rgba(255, 0, 170, 0.9), 0 0 18px rgba(255, 0, 170, 0.8), 0 0 35px rgba(180, 0, 255, 0.7), 0 0 55px rgba(255, 0, 170, 0.35);
    }
    100% {
        text-shadow: 0 0 4px rgba(255, 0, 170, 0.6), 0 0 12px rgba(180, 0, 255, 0.7), 0 0 28px rgba(255, 0, 170, 0.5);
    }
}

.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ff5ac8;
    box-shadow: 0 0 4px #ff00aa, 0 0 8px #ff00aa, 0 0 14px #b000ff;
    opacity: 0;
    pointer-events: none;
    animation: sparkle 1.8s ease-in-out infinite;
}

.spark-1 { top: 2px; left: 8px; animation-delay: 0.1s; }
.spark-2 { top: -6px; left: 65px; animation-delay: 0.8s; }
.spark-3 { top: 20px; left: -8px; animation-delay: 1.2s; }
.spark-4 { top: 42px; left: 35px; animation-delay: 0.4s; }
.spark-5 { top: 8px; right: 70px; animation-delay: 1.5s; }
.spark-6 { top: 48px; right: 25px; animation-delay: 0.65s; }

@keyframes sparkle {
    0% { opacity: 0; transform: scale(0.2) translate(0, 0); }
    20% { opacity: 1; transform: scale(1.3) translate(0, -2px); }
    40% { opacity: 0.8; transform: scale(0.8) translate(2px, -4px); }
    60% { opacity: 0.4; transform: scale(0.5) translate(-2px, -7px); }
    100% { opacity: 0; transform: scale(0.1) translate(1px, -10px); }
}

/* =========================
   MAIN
========================= */
.panel-main {
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 30px;
    position: relative;
    z-index: 1000;
}

.panel-container {
    max-width: 800px;
    width: 100%;
}

.panel-card {
    background: rgba(15, 5, 25, 0.75);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 0, 170, 0.25);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 0, 170, 0.05);
}

.panel-card h1 {
    text-align: center;
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ff00aa, #b000ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 20px;
}

/* =========================
   PANEL OPTIONS
========================= */
.panel-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel-option {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 30px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.panel-option:hover {
    background: rgba(255, 0, 170, 0.08);
    border-color: rgba(255, 0, 170, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.panel-option-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.panel-option h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.panel-option p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
    line-height: 1.6;
}

.panel-option-btn {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 0, 170, 0.15);
    border: 1px solid rgba(255, 0, 170, 0.3);
    border-radius: 30px;
    color: #ff4fc3;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.panel-option:hover .panel-option-btn {
    background: rgba(255, 0, 170, 0.25);
    border-color: #ff00aa;
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.15);
}

/* =========================
   FORM CONTAINER
========================= */
.form-container {
    margin-top: 30px;
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   AUTH FORM
========================= */
.auth-form {
    display: none;
}

.auth-form .form-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-form .form-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: white;
    padding: 6px 18px;
    background: rgba(255, 0, 170, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 0, 170, 0.3);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.auth-form .form-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.auth-form .form-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* =========================
   FORM TABS
========================= */
.form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 4px;
}

.form-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-tab:hover {
    color: white;
}

.form-tab.active {
    background: rgba(255, 0, 170, 0.2);
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.05);
}

/* =========================
   FORM CONTENT
========================= */
.form-content {
    display: none;
}

.form-content.active {
    display: block;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #ff00aa;
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   ===== فیلد رمز عبور با چشم =====
   ============================================================ */
.password-group {
    position: relative;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.password-input-wrapper input:focus {
    border-color: #ff00aa;
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.password-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ===== دکمه چشم ===== */
.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.toggle-password:hover {
    color: #ff4fc3;
    background: rgba(255, 0, 170, 0.1);
}

.toggle-password.active {
    color: #ff4fc3;
}

.toggle-password svg {
    transition: all 0.3s ease;
}

.toggle-password:hover svg {
    transform: scale(1.1);
}

/* =========================
   FORM OPTIONS
========================= */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.form-options label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.form-options label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ff00aa;
    cursor: pointer;
}

.forgot-password {
    font-size: 13px;
    color: #ff4fc3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: white;
}

.agree-terms a {
    color: #ff4fc3;
    text-decoration: none;
}

.agree-terms a:hover {
    text-decoration: underline;
}

/* =========================
   FORM SUBMIT
========================= */
.form-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #ff00aa, #b000ff);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 0, 170, 0.3);
}

.form-submit:active {
    transform: scale(0.98);
}

.form-submit.admin-submit {
    background: linear-gradient(135deg, #ff6b35, #ff00aa);
}

.form-submit.admin-submit:hover {
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

/* =========================
   FORM BACK
========================= */
.form-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: inherit;
}

.form-back:hover {
    color: white;
}

/* =========================
   FOOTER
========================= */
.footer {
    flex-shrink: 0;
    width: fit-content;
    min-width: 320px;
    max-width: 95%;
    padding: 12px 25px;
    margin: 0 auto 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    pointer-events: none;
    border: 1px solid rgba(255, 0, 170, 0.4);
    border-radius: 30px;
    background: rgba(15, 5, 25, 0.45);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 10px rgba(255, 0, 170, 0.2), 0 0 25px rgba(176, 0, 255, 0.15);
    z-index: 100;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
}

.footer-text span {
    color: #ff4fc3;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 0, 170, 0.8), 0 0 10px rgba(255, 0, 170, 0.6), 0 0 20px rgba(180, 0, 255, 0.5);
}

.copyright {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* =========================
   BACK TO TOP
========================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 0, 170, 0.6);
    background: rgba(15, 5, 25, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.2), 0 0 40px rgba(176, 0, 255, 0.1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: #ff00aa;
    box-shadow: 0 0 30px rgba(255, 0, 170, 0.4), 0 0 60px rgba(176, 0, 255, 0.2);
    background: rgba(255, 0, 170, 0.15);
}

.back-to-top:active {
    transform: scale(0.9);
}

.back-to-top svg {
    stroke: #ff4fc3;
    filter: drop-shadow(0 0 5px rgba(255, 0, 170, 0.5));
    transition: all 0.3s ease;
}

.back-to-top:hover svg {
    stroke: white;
    filter: drop-shadow(0 0 10px rgba(255, 0, 170, 0.8));
}

/* =========================
   SCROLL ANIMATIONS
========================= */
.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* ===== تبلت و موبایل بزرگ ===== */
@media (max-width: 768px) {
    .panel-card {
        padding: 25px 20px;
    }

    .panel-card h1 {
        font-size: 28px;
    }

    .panel-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .panel-option {
        padding: 25px 20px;
    }

    .panel-option-icon {
        font-size: 36px;
    }

    /* ===== فیلد چشم در تبلت ===== */
    .password-input-wrapper input[type="password"],
    .password-input-wrapper input[type="text"] {
        padding: 10px 44px 10px 14px;
        font-size: 14px;
    }
    
    .toggle-password {
        width: 28px;
        height: 28px;
        left: 10px;
    }
    
    .toggle-password svg {
        width: 18px;
        height: 18px;
    }
}

/* ===== موبایل کوچک ===== */
@media (max-width: 480px) {
    .panel-card {
        padding: 18px 14px;
    }

    .panel-card h1 {
        font-size: 24px;
    }

    .panel-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .panel-option {
        padding: 20px 16px;
    }

    .panel-option-icon {
        font-size: 32px;
    }

    .panel-option h3 {
        font-size: 17px;
    }

    .panel-option p {
        font-size: 13px;
    }

    .auth-form .form-header h2 {
        font-size: 22px;
    }

    .auth-form .form-header p {
        font-size: 13px;
    }

    .form-tabs {
        gap: 6px;
        padding: 3px;
    }

    .form-tab {
        font-size: 13px;
        padding: 8px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .form-group label {
        font-size: 13px;
    }

    /* ===== فیلد چشم در موبایل ===== */
    .password-input-wrapper input[type="password"],
    .password-input-wrapper input[type="text"] {
        padding: 10px 40px 10px 12px;
        font-size: 13px;
    }

    .toggle-password {
        width: 26px;
        height: 26px;
        left: 8px;
    }

    .toggle-password svg {
        width: 16px;
        height: 16px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }

    .form-options label {
        font-size: 12px;
    }

    .forgot-password {
        font-size: 12px;
    }

    .form-submit {
        font-size: 14px;
        padding: 12px;
    }

    .form-back {
        font-size: 13px;
        padding: 6px 12px;
    }

    /* ===== فوتر ===== */
    .footer {
        min-width: unset;
        width: 92%;
        max-width: 320px;
        padding: 8px 14px;
        border-radius: 20px;
        margin: 0 auto 12px;
    }

    .footer-text {
        font-size: 10px;
        line-height: 1.5;
    }

    .copyright {
        font-size: 9px;
        margin-top: 2px;
    }

    /* ===== Back to Top ===== */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== صفحه‌های بسیار کوچک (زیر 360px) ===== */
@media (max-width: 360px) {
    .panel-card {
        padding: 14px 10px;
    }

    .panel-card h1 {
        font-size: 20px;
    }

    .panel-option {
        padding: 16px 12px;
    }

    .panel-option-icon {
        font-size: 28px;
    }

    .panel-option h3 {
        font-size: 15px;
    }

    .panel-option p {
        font-size: 12px;
    }

    .form-tab {
        font-size: 12px;
        padding: 6px;
    }

    .form-group input {
        padding: 8px 12px;
        font-size: 13px;
    }

    .password-input-wrapper input[type="password"],
    .password-input-wrapper input[type="text"] {
        padding: 8px 36px 8px 10px;
        font-size: 12px;
    }

    .toggle-password {
        width: 24px;
        height: 24px;
        left: 6px;
    }

    .toggle-password svg {
        width: 14px;
        height: 14px;
    }

    .form-submit {
        font-size: 13px;
        padding: 10px;
    }

    .footer {
        padding: 6px 10px;
        min-width: unset;
        width: 95%;
        max-width: 280px;
    }

    .footer-text {
        font-size: 9px;
    }

    .copyright {
        font-size: 8px;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 38px;
        height: 38px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}