/* ============================================
   DICELEXIA — Edit Profile Page Styles
   ============================================ */

/* --- Locked State --- */
.profile-locked {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.profile-locked .lock-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(200, 168, 78, 0.3));
}

.profile-locked h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.profile-locked p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
}

/* --- Page Layout --- */
.profile-edit-page {
    min-height: 100vh;
    padding: 120px 2rem 60px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.profile-edit-page .container {
    width: 100%;
    max-width: 560px;
}

/* --- Card --- */
.profile-edit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    padding: 2.5rem;
}

/* --- Card Header --- */
.profile-edit-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.profile-edit-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--bg-primary);
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(200, 168, 78, 0.25);
}

.profile-edit-header h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(200, 168, 78, 0.2);
    margin-bottom: 0.25rem;
}

.profile-edit-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Form --- */
.profile-form .form-group {
    margin-bottom: 1.5rem;
}

.profile-form .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.profile-form input[type="text"],
.profile-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition);
}

.profile-form input[type="text"]::placeholder,
.profile-form textarea::placeholder {
    color: var(--text-muted);
}

.profile-form input[type="text"]:focus,
.profile-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 168, 78, 0.15);
}

.profile-form textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* --- Character Count --- */
.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* --- Games Checkboxes --- */
.games-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-primary);
    transition: var(--transition);
    min-height: 44px;
    user-select: none;
}

.checkbox-label:hover {
    border-color: var(--border-accent);
    background: rgba(200, 168, 78, 0.04);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    background: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '✓';
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom + * {
    color: var(--accent);
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: var(--border-accent);
    background: rgba(200, 168, 78, 0.06);
}

/* --- Feedback --- */
.profile-feedback {
    font-size: 0.875rem;
    text-align: center;
    min-height: 1.4em;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.profile-feedback.success {
    color: #27ae60;
}

.profile-feedback.error {
    color: var(--red-bright);
}

/* --- Form Actions --- */
.profile-form-actions {
    margin-top: 1.5rem;
}

.profile-form-actions .btn {
    width: 100%;
    min-height: 44px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .profile-edit-page {
        padding: 100px 1rem 40px;
    }

    .profile-edit-card {
        padding: 1.5rem;
    }

    .profile-edit-header {
        gap: 1rem;
    }

    .profile-edit-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    .profile-edit-header h1 {
        font-size: 1.3rem;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    .profile-edit-page {
        padding: 90px 0.75rem 30px;
    }

    .profile-edit-card {
        padding: 1.25rem;
    }

    .profile-edit-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .profile-edit-header h1 {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .games-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* --- Danger Zone --- */
.danger-zone {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(192, 57, 43, 0.45);
    border-radius: 6px;
    background: rgba(192, 57, 43, 0.06);
}

.danger-zone h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #e74c3c;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
}

.danger-zone p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.btn-delete-account {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 20px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete-account:hover {
    background: #a93226;
}

.btn-delete-account:active {
    background: #922b21;
}

/* --- Delete Confirm Overlay --- */
.delete-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.delete-confirm-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.delete-confirm-card {
    background: var(--bg-card);
    border: 1px solid rgba(192, 57, 43, 0.5);
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    transform: translateY(12px);
    transition: transform 0.2s ease;
}

.delete-confirm-overlay.open .delete-confirm-card {
    transform: translateY(0);
}

.delete-confirm-card h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    color: #e74c3c;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.delete-confirm-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.delete-confirm-field {
    margin-bottom: 1rem;
}

.delete-confirm-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.delete-confirm-field input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    min-height: 44px;
    transition: var(--transition);
}

.delete-confirm-field input[type="password"]::placeholder {
    color: var(--text-muted);
}

.delete-confirm-field input[type="password"]:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.delete-confirm-feedback {
    font-size: 0.875rem;
    min-height: 1.4em;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.delete-confirm-feedback.error {
    color: var(--red-bright);
}

.delete-confirm-feedback.success {
    color: #27ae60;
}

.delete-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-delete-cancel {
    min-height: 44px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete-cancel:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.btn-delete-confirm {
    min-height: 44px;
    padding: 10px 24px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete-confirm:hover:not(:disabled) {
    background: #a93226;
}

.btn-delete-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Danger Zone + Overlay Responsive --- */
@media (max-width: 768px) {
    .danger-zone {
        padding: 1.25rem;
    }

    .delete-confirm-card {
        padding: 1.5rem;
    }

    .delete-confirm-actions {
        flex-direction: column-reverse;
    }

    .btn-delete-cancel,
    .btn-delete-confirm {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .danger-zone {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .delete-confirm-card {
        padding: 1.25rem;
    }

    .delete-confirm-card h2 {
        font-size: 1.1rem;
        letter-spacing: 1.5px;
    }
}
