/**
 * 땅튜브 인증 스타일 (Chzzk-inspired)
 *
 * @package DdangTube
 * @version 2.0.0
 */

/* ========== Login Page ========== */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* 배경 글로우 효과 */
.login-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(234, 126, 17, 0.08) 0%,
        rgba(234, 126, 17, 0.03) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* 로그인 카드 */
.login-container {
    width: 100%;
    max-width: 440px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 3rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    animation: loginFadeIn 0.5s ease-out;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Header / Brand ========== */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-brand-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(234, 126, 17, 0.1);
    border-radius: 14px;
    border: 1px solid rgba(234, 126, 17, 0.15);
}

.login-brand-icon svg {
    width: 28px;
    height: 28px;
}

.login-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.9375rem;
    font-family: 'Galmuri11', sans-serif;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========== Alert Messages ========== */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    animation: loginFadeIn 0.3s ease-out;
}

.login-alert--error {
    background: rgba(240, 71, 71, 0.08);
    border: 1px solid rgba(240, 71, 71, 0.2);
}

.login-alert--warning {
    background: rgba(250, 166, 26, 0.08);
    border: 1px solid rgba(250, 166, 26, 0.2);
}

.login-alert__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.login-alert--error .login-alert__icon {
    color: var(--accent-danger);
}

.login-alert--warning .login-alert__icon {
    color: var(--accent-warning);
}

.login-alert strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.login-alert--error strong {
    color: var(--accent-danger);
}

.login-alert--warning strong {
    color: var(--accent-warning);
}

.login-alert p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ========== Google Login Button ========== */
.login-action {
    margin-bottom: 2rem;
}

.google-login-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    height: 52px;
    background-color: #ffffff;
    color: #3c4043;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.google-login-button:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #3c4043;
    text-decoration: none;
}

.google-login-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.google-login-button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.google-login-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========== Features List ========== */
.login-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.login-feature__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--accent-primary);
    opacity: 0.8;
}

/* ========== Footer ========== */
.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-secondary);
    text-align: center;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.login-back-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    text-decoration: none;
}

.login-back-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ========== User Avatar ========== */
.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background-color: var(--accent-success);
    border: 3px solid var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-badge svg {
    width: 14px;
    height: 14px;
    color: white;
}

/* ========== Profile Page ========== */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.profile-field {
    margin-bottom: 1.5rem;
}

.profile-field:last-child {
    margin-bottom: 0;
}

.profile-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.profile-value {
    color: var(--text-primary);
    font-size: 1rem;
}

.profile-input {
    width: 100%;
}

.profile-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.profile-avatar-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ========== Delete Account ========== */
.delete-account-warning {
    background-color: rgba(240, 71, 71, 0.1);
    border: 1px solid var(--accent-danger);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.delete-account-warning h3 {
    color: var(--accent-danger);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.delete-account-warning ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.delete-account-warning li {
    margin-bottom: 0.5rem;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
    .login-page {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .login-glow {
        width: 400px;
        height: 400px;
    }

    .login-container {
        padding: 2rem 1.5rem;
        border-radius: 12px;
        max-width: 100%;
    }

    .login-header {
        margin-bottom: 2rem;
    }

    .login-brand-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .login-brand-icon svg {
        width: 24px;
        height: 24px;
    }

    .login-logo {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.875rem;
    }

    .google-login-button {
        height: 48px;
        font-size: 0.875rem;
        border-radius: 10px;
    }

    .login-features {
        padding: 1.25rem;
        border-radius: 10px;
    }

    .profile-section {
        padding: 1.5rem;
    }

    .profile-avatar-upload {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 1.5rem 1.25rem;
    }

    .login-feature {
        font-size: 0.75rem;
    }
}
