/**
 * PleChat - Auth Styles
 */

.app-body {
    min-height: 100vh;
    background: var(--bg-primary);
    overflow-y: auto !important; /* Force scroll for long profiles */
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 32px 16px;
    position: relative;
    overflow-y: auto !important;
}

.auth-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    z-index: 2;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.input-wrapper input, .input-wrapper select {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.input-wrapper select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
}

.input-wrapper select.futuristic-select {
    border: 1px solid rgba(108, 99, 255, 0.35);
    box-shadow: 0 0 10px rgba(108, 99, 255, 0.08);
    background: rgba(108, 99, 255, 0.02) !important;
}

.input-wrapper input:focus, .input-wrapper select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.25), 0 0 0 3px rgba(108, 99, 255, 0.15) !important;
    background: var(--bg-hover) !important;
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    transition: color var(--transition);
}

.toggle-password:hover {
    color: var(--text-primary);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 16px;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    border-radius: 4px;
}

.form-link {
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-form .btn-primary {
    margin-top: 8px;
    padding: 13px 20px;
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Decorative Orbs */
.auth-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.decoration-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #6C63FF;
    top: -100px;
    right: -80px;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: #3B82F6;
    bottom: -80px;
    left: -60px;
    animation: orbFloat 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 180px;
    height: 180px;
    background: #8B5CF6;
    top: 40%;
    left: 50%;
    animation: orbFloat 12s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.05); }
    66% { transform: translate(-15px, 20px) scale(0.95); }
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 20px;
        border-radius: var(--radius-lg);
    }

    .auth-logo h1 {
        font-size: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Profile Page Modern Styles - TYPE X */
.x-profile-container {
    min-height: 100vh;
    background: var(--bg-primary);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 100px;
}

.x-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.x-nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.x-nav-back:hover {
    color: var(--accent-primary);
}

.x-nav-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}



.x-profile-header-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 16px 20px;
}

.x-avatar-wrapper.large {
    width: 180px;
    height: 180px;
    margin-bottom: 16px;
    position: relative;
    z-index: 5;
    padding: 6px;
    background: var(--accent-gradient);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(132, 239, 210, 0.2);
}

.x-avatar-wrapper.large img, .x-avatar-wrapper.large .x-avatar-placeholder {
    border: 4px solid var(--bg-primary);
}

.x-avatar-wrapper img, .x-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.x-avatar-placeholder {
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
}

.x-avatar-edit {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.x-avatar-wrapper:hover .x-avatar-edit { opacity: 1; }

.x-btn-primary {
    background: white;
    color: black;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.x-btn-primary:hover { background: #e5e7eb; }

.x-user-info.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 32px 32px;
}

.x-name-row.centered {
    justify-content: center;
    margin-bottom: 4px;
}

.x-meta.centered {
    justify-content: center;
}

.x-actions.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.x-btn-primary.large {
    width: 100%;
    max-width: 300px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: white;
    font-size: 1rem;
}

.x-bio {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.x-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.x-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.x-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin: 12px -16px 0;
}

.x-tab {
    flex: 1;
    text-align: center;
    padding: 16px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.x-tab:hover { background: rgba(255,255,255,0.03); }

.x-tab.active {
    color: var(--text-primary);
}

.x-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Feed Settings */
.x-feed { padding-bottom: 60px; }

.x-settings-list {
    display: flex;
    flex-direction: column;
}

.x-field-group {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
}

.x-field-group:hover { background: rgba(255,255,255,0.01); }

.x-field-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.x-input, .x-textarea {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 4px 0;
}

.x-input:focus, .x-textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-primary);
}

.x-input:disabled { 
    color: var(--text-muted); 
    cursor: not-allowed;
    border-bottom: 1px dashed var(--border-color);
}

.x-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.x-emoji-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-emoji-btn:hover {
    background: rgba(132, 239, 210, 0.1);
    transform: scale(1.1);
}

.x-bio-emoji-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    padding: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 8px;
    max-height: 180px;
    overflow-y: auto;
    animation: slideUp 0.2s ease;
}

.x-bio-emoji-picker span {
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
    user-select: none;
    padding: 4px;
    border-radius: 4px;
}

.x-bio-emoji-picker span:hover {
    background: var(--bg-hover);
    transform: scale(1.2);
}

.x-input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.x-divider {
    height: 12px;
    background: #111827;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 600px) {
    .x-profile-container { border: none; }
    .x-avatar-wrapper.large { width: 120px; height: 120px; }
    .x-avatar-placeholder { font-size: 2.5rem; }
    .x-user-info.centered { padding: 20px; }
}
