/* Override global body styles for auth pages */
body {
    overflow: auto !important;
    height: auto !important;
}

.auth-container {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-grey) 50%, var(--color-dark-grey) 100%);
    padding: 20px;
    box-sizing: border-box;
}

.auth-card {
    background: var(--color-white-95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px var(--color-black-10);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--color-white-20);
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header h1 {
    color: var(--color-grey);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--color-light-grey);
    font-size: 16px;
}

/* Links in auth header and confirmation instructions should appear dark grey (not blue) */
.auth-header a,
.confirmation-instructions a {
    color: var(--color-grey);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-grey);
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--color-white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px var(--color-purple-10);
}

.form-group input::placeholder {
    color: var(--color-placeholder);
}

.username-hint {
    font-size: 12px;
    color: var(--color-light-grey);
    margin-top: 6px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-grey) 50%, var(--color-dark-grey) 100%);
    color: var(--color-white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--color-purple-30);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer a {
    color: var(--color-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--color-grey);
}

.error-message {
    background: var(--color-error-bg);
    color: var(--color-error-text);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--color-error-border);
    display: none;
}

.success-message {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--color-success-border);
    display: none;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-white-30);
    border-top: 2px solid var(--color-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.confirmation-code-frame {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 25px;
    padding: 12px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-white);
    cursor: pointer;
    user-select: all;
    transition: border-color 0.3s ease;
}

.confirmation-code-frame:hover {
    border-color: var(--color-purple);
}

.confirmation-code-frame span {
    font-weight: 600;
    color: var(--color-grey);
}

.confirmation-code-frame {
    position: relative;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-grey);
    color: var(--color-white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin-bottom: 8px;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-grey);
}

.confirmation-code-frame:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .auth-card {
        margin-top: 64px;
        margin-bottom: 64px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
        min-height: 100vh;
        min-height: 100dvh;
        align-items: center;
        justify-content: center;
    }
    
    .auth-card {
        padding: 30px 20px;
        margin: 64px 0;
        width: 100%;
        max-width: none;
    }

    .auth-header h1 {
        font-size: 24px;
    }
} 