/* ============================================================
   DEVELOPER PAGE STYLES
   Version: 2.5.3
   ============================================================ */

/* ============================================================
   CSS VARIABLES (inherited from root)
   ============================================================ */
/* Uses :root variables from index.css:
   --bg-dark, --bg-card, --text-dark, --text-gray, 
   --purple, --purple-light, --grad, --border, --shadow
   ============================================================ */

/* ===== CONTAINER ===== */
.developer-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ===== CARD ===== */
.dev-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 35px 30px;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dev-card:hover {
    border-color: var(--purple);
    box-shadow: 0 20px 60px rgba(176, 8, 243, 0.08);
    transform: translateY(-3px);
}

/* ===== CARD HEADER ===== */
.dev-card-header {
    text-align: center;
    margin-bottom: 25px;
    width: 100%;
}

.dev-card-header .icon-large {
    font-size: 2.2rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
    display: block;
}

.dev-card-header .logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.dev-card-header .subtitle {
    font-size: 0.8rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ===== AUTH TABS ===== */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: rgba(176, 8, 243, 0.06);
    padding: 5px;
    border-radius: 50px;
    width: 100%;
}

.auth-tab {
    flex: 1;
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.auth-tab i {
    font-size: 0.8rem;
}

.auth-tab:hover {
    color: var(--purple);
    background: rgba(176, 8, 243, 0.08);
}

.auth-tab.active {
    background: var(--grad);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(176, 8, 243, 0.3);
}

/* ===== FORMS ===== */
.auth-form {
    display: none;
    animation: devFadeIn 0.3s ease;
    width: 100%;
}

.auth-form.active {
    display: block;
}

@keyframes devFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORM GROUPS (RTL) ===== */
.form-group {
    margin-bottom: 16px;
    width: 100%;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: var(--text-gray);
    font-weight: 500;
    text-align: right;
}

.form-group label i {
    margin-left: 6px;
    color: var(--purple);
    font-size: 0.75rem;
}

.form-group .required {
    color: #ef4444;
    margin-right: 2px;
}

/* ===== INPUTS ===== */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-dark);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text-dark);
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-gray);
    opacity: 0.5;
    text-align: right;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(176, 8, 243, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* ===== SELECT DROPDOWN ===== */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-dark);
    color: var(--text-dark);
}

/* ===== CHECKBOX GRID ===== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
    background: rgba(176, 8, 243, 0.04);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    max-height: 140px;
    overflow-y: auto;
}

.checkbox-grid::-webkit-scrollbar {
    width: 4px;
}

.checkbox-grid::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 10px;
}

.checkbox-grid::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    justify-content: flex-start;
}

.checkbox-label:hover {
    background: rgba(176, 8, 243, 0.06);
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--purple);
    flex-shrink: 0;
}

/* ===== PASSWORD TOGGLE ===== */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-left: 40px;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 5px;
    transition: all 0.3s ease;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password i {
    font-size: 0.85rem;
}

.toggle-password:hover {
    color: var(--purple);
    opacity: 1;
}

/* ===== BUTTONS ===== */
.dev-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 22px;
    background: var(--grad);
    border: none;
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 10px;
    box-shadow: 0 4px 20px rgba(176, 8, 243, 0.25);
    text-align: center;
}

.dev-btn i {
    font-size: 0.85rem;
}

.dev-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(176, 8, 243, 0.35);
    background: linear-gradient(135deg, var(--purple-light), var(--purple));
}

.dev-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ===== SUCCESS BUTTON (GREEN) ===== */
.dev-btn-success {
    background: linear-gradient(135deg, #3DDC84, #1a8a4a);
    box-shadow: 0 4px 20px rgba(61, 220, 132, 0.25);
}

.dev-btn-success:hover {
    background: linear-gradient(135deg, #5eea9a, #3DDC84);
    box-shadow: 0 6px 30px rgba(61, 220, 132, 0.35);
}

/* ===== ERROR MESSAGE ===== */
.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 12px;
    text-align: center;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 10px;
    display: none;
    border: 1px solid rgba(239, 68, 68, 0.12);
    width: 100%;
}

.error-msg.show {
    display: block;
}

/* ===== CAPTCHA ===== */
.captcha-container {
    margin-top: 6px;
    animation: devFadeIn 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.captcha-container.hidden {
    display: none;
}

.captcha-container .subtitle {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
    width: 100%;
}

#captchaCanvas {
    border-radius: 14px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 3/1;
    transition: all 0.3s ease;
}

#captchaCanvas:hover {
    border-color: var(--purple);
}

.refresh-btn {
    background: var(--bg-dark);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-gray);
    font-size: 1rem;
    flex-shrink: 0;
}

.refresh-btn:hover {
    background: var(--purple);
    transform: rotate(180deg);
    color: #ffffff;
    border-color: var(--purple);
}

.captcha-container input {
    margin-bottom: 10px;
    width: 100%;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* ----- Tablet ----- */
@media (max-width: 768px) {
    .developer-container {
        max-width: 420px;
        padding: 90px 15px 30px;
    }

    .dev-card {
        padding: 28px 22px;
        border-radius: 24px;
    }

    .dev-card-header .icon-large {
        font-size: 1.8rem;
    }

    .dev-card-header .logo {
        font-size: 1.2rem;
    }

    .dev-card-header .subtitle {
        font-size: 0.75rem;
    }

    .auth-tab {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    .checkbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        max-height: 120px;
        padding: 12px;
    }
}

/* ----- Mobile ----- */
@media (max-width: 480px) {
    .developer-container {
        padding: 80px 10px 20px;
        max-width: 100%;
    }

    .dev-card {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .dev-card-header {
        margin-bottom: 18px;
    }

    .dev-card-header .icon-large {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .dev-card-header .logo {
        font-size: 1rem;
    }

    .dev-card-header .subtitle {
        font-size: 0.7rem;
    }

    .auth-tabs {
        margin-bottom: 18px;
        gap: 5px;
        padding: 4px;
        border-radius: 40px;
    }

    .auth-tab {
        font-size: 0.7rem;
        padding: 7px 10px;
        border-radius: 40px;
    }

    .auth-tab i {
        display: none;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .form-group label i {
        font-size: 0.7rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 9px 14px;
        font-size: 0.82rem;
        border-radius: 10px;
        border-width: 1.5px;
    }

    .form-group textarea {
        min-height: 50px;
    }

    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px;
        gap: 4px;
        max-height: 110px;
        border-radius: 10px;
    }

    .checkbox-label {
        font-size: 0.72rem;
        padding: 3px 6px;
        gap: 5px;
    }

    .checkbox-label input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }

    .dev-btn {
        padding: 10px 18px;
        font-size: 0.82rem;
        margin-top: 8px;
        border-radius: 40px;
    }

    .dev-btn i {
        font-size: 0.78rem;
    }

    #captchaCanvas {
        max-width: 160px;
        border-radius: 10px;
    }

    .refresh-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .captcha-box {
        gap: 8px;
        margin-bottom: 10px;
    }

    .captcha-container input {
        margin-bottom: 8px;
    }

    .password-wrapper input {
        padding-left: 34px;
    }

    .toggle-password {
        left: 8px;
        font-size: 0.65rem;
    }

    .toggle-password i {
        font-size: 0.7rem;
    }

    .error-msg {
        font-size: 0.72rem;
        padding: 6px 10px;
        margin-top: 8px;
    }
}

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */
[data-theme="light"] .dev-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .dev-card:hover {
    border-color: var(--purple);
}

[data-theme="light"] .auth-tabs {
    background: rgba(176, 8, 243, 0.05);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-dark);
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(176, 8, 243, 0.1);
}

[data-theme="light"] .checkbox-grid {
    background: rgba(176, 8, 243, 0.04);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .refresh-btn {
    background: #f1f5f9;
}

[data-theme="light"] .toggle-password {
    color: #475569;
}

[data-theme="light"] .toggle-password:hover {
    color: var(--purple);
}

[data-theme="light"] .error-msg {
    background: rgba(239, 68, 68, 0.08);
}