/* ═══════════════════════════════════════════════════════════════════════════
   AUTH - Shared styles for login, register, password reset, etc.
   ═══════════════════════════════════════════════════════════════════════════ */

.auth-body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d30 50%, #1a1a1a 100%);
    min-height: 100vh;
    color: var(--color-text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Animated background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-element {
    position: absolute;
    background: linear-gradient(45deg, rgba(240, 211, 22, 0.1), rgba(240, 211, 22, 0.05));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.bg-element:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 80%;
    animation-delay: 0s;
}

.bg-element:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 10%;
    animation-delay: 2s;
}

.bg-element:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%      { transform: translateY(-20px) rotate(180deg); }
}

/* Card container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.3rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(37, 37, 37, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(240, 211, 22, 0.2);
    border-radius: 23px;
    padding: 6rem;
    width: 100%;
    max-width: 552px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(240, 211, 22, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-main), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 2.875rem;
}

.auth-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 1.725rem;
    background: linear-gradient(135deg, var(--color-main), #ffed4e);
    border-radius: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(240, 211, 22, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

.auth-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.575rem;
}

.auth-tagline {
    color: var(--color-text-secondary);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Form */
.auth-form {
    margin-bottom: 2.3rem;
}

.auth-form .form-group {
    margin-bottom: 1.725rem;
}

.auth-form .form-label {
    display: block;
    color: var(--color-text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.575rem;
    letter-spacing: 0.5px;
}

.auth-form .form-input {
    width: 100%;
    padding: 1.15rem 1.4375rem;
    background: rgba(85, 85, 85, 0.8);
    border: 2px solid rgba(100, 100, 100, 0.8);
    border-radius: 14px;
    color: var(--color-text-primary);
    font-size: 1.15rem;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.auth-form .form-input:focus {
    border-color: var(--color-main);
    background: rgba(95, 95, 95, 1);
    box-shadow:
        0 0 0 3px rgba(240, 211, 22, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.auth-form .form-input::placeholder {
    color: var(--color-text-muted);
}

/* Submit button */
.auth-btn {
    width: 100%;
    padding: 1.15rem 2.3rem;
    background: linear-gradient(135deg, var(--color-main), #ffed4e);
    border: none;
    border-radius: 14px;
    color: #111;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(240, 211, 22, 0.3);
    margin-top: 2rem;
}
.auth-btn.loading .auth-btn-content {
    visibility: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(240, 211, 22, 0.4);
    background: linear-gradient(135deg, #ffed4e, var(--color-main));
}

.auth-btn:active { transform: translateY(0); }

.auth-btn svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

/* Message area */
.auth-message {
    text-align: center;
    padding: 1.15rem;
    border-radius: 11px;
    margin-top: 1.15rem;
    font-weight: 500;
    min-height: 3.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-message.success {
    background: rgba(93, 214, 147, 0.1);
    border: 1px solid rgba(93, 214, 147, 0.3);
    color: var(--color-success);
}

.auth-message.error {
    background: rgba(252, 75, 11, 0.1);
    border: 1px solid rgba(252, 75, 11, 0.3);
    color: var(--color-error);
}

/* Loading state */
.auth-btn.loading {
    position: relative;
    pointer-events: none;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 23px;
    height: 23px;
    margin: -11.5px 0 0 -11.5px;
    border: 2px solid #111;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container { padding: 1.15rem; }
    .auth-card      { padding: 2.3rem; }
    .auth-title     { font-size: 2rem; }
    .bg-element     { display: none; }
}

/* Password field with reveal toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 3.75rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--color-main);
}

.password-toggle svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

/* Kill Chrome's white autofill background */
.auth-form .form-input:-webkit-autofill,
.auth-form .form-input:-webkit-autofill:hover,
.auth-form .form-input:-webkit-autofill:focus,
.auth-form .form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(85, 85, 85, 1) inset !important;
    -webkit-text-fill-color: var(--color-text-primary) !important;
    caret-color: var(--color-text-primary);
    transition: background-color 9999s ease-in-out 0s;
    
}