﻿/* ================================================
   Auth.css - 로그인 페이지 전용 스타일
   스코프: .page-auth
   ================================================ */

.page-auth {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    background:
        linear-gradient(145deg, rgba(16, 185, 129, 0.08), transparent 28%),
        linear-gradient(315deg, rgba(14, 165, 233, 0.10), transparent 34%),
        #07080d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 0;
    position: relative;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 배경 오로라 */
.page-auth .auth-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-auth .auth-aurora::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    animation: aurora1 8s ease-in-out infinite alternate;
}

.page-auth .auth-aurora::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: 10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.09) 0%, transparent 70%);
    animation: aurora2 10s ease-in-out infinite alternate;
}

@keyframes aurora1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-5%, 5%) scale(1.1); }
}

@keyframes aurora2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(5%, -5%) scale(1.15); }
}

/* 그리드 패턴 */
.page-auth .auth-grid {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(to right, #94a3b8 1px, transparent 1px),
        linear-gradient(to bottom, #94a3b8 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* 점 패턴 */
.page-auth .auth-dots {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: radial-gradient(circle, #94a3b8 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* 컨텐츠 래퍼 */
.page-auth .auth-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: auto 0;
}

/* 로고 영역 */
.page-auth .auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
}

.page-auth .auth-logo-mark {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
}

.page-auth .auth-logo-mark .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.25);
    animation: ring-pulse 3s ease-in-out infinite;
}

.page-auth .auth-logo-mark .ring:nth-child(2) {
    inset: -8px;
    border-color: rgba(6, 182, 212, 0.12);
    animation-delay: 0.5s;
}

.page-auth .auth-logo-mark .ring:nth-child(3) {
    inset: -16px;
    border-color: rgba(6, 182, 212, 0.06);
    animation-delay: 1s;
}

@keyframes ring-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.03); }
}

.page-auth .auth-logo-mark .core {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-auth .auth-logo-mark .core svg {
    width: 32px;
    height: 32px;
    color: #06b6d4;
}

.page-auth .auth-brand {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0;
    margin-bottom: 6px;
}

.page-auth .auth-brand span {
    color: #06b6d4;
}

.page-auth .auth-tagline {
    font-size: 11px;
    color: #475569;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: monospace;
}

/* 카드 */
.page-auth .auth-card {
    width: 100%;
    background: rgba(13, 15, 23, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 18px;
    padding: 36px 32px 32px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 24px 64px rgba(0, 0, 0, 0.5);
}

.page-auth .inapp-warning {
    grid-template-columns: 34px 1fr;
    gap: 12px;
    background: rgba(251, 191, 36, 0.10);
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 22px;
}

.page-auth .inapp-warning-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 191, 36, 0.14);
    color: #fbbf24;
}

.page-auth .inapp-warning-icon svg {
    width: 19px;
    height: 19px;
}

.page-auth .inapp-warning-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.page-auth .inapp-warning-copy strong {
    color: #fde68a;
    font-size: 13px;
}

.page-auth .inapp-warning-copy span {
    color: #a8a29e;
    font-size: 12px;
    line-height: 1.55;
}

.page-auth .inapp-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.page-auth .btn-browser {
    border: 1px solid rgba(251, 191, 36, 0.32);
    background: rgba(251, 191, 36, 0.13);
    color: #fde68a;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.page-auth .btn-browser:hover {
    background: rgba(251, 191, 36, 0.22);
}

.page-auth .btn-browser.secondary {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5e1;
}

/* 카드 헤더 */
.page-auth .auth-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.page-auth .auth-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.page-auth .auth-card-header p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* 에러 메시지 */
.page-auth .auth-error {
    background: rgba(127, 29, 29, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    color: #fca5a5;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-auth .auth-error::before {
    content: '⚠';
    font-size: 14px;
    flex-shrink: 0;
}

/* Google 로그인 버튼 */
.page-auth .btn-google {
    width: 100%;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    min-height: 52px;
    padding: 15px 24px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    line-height: 1.3;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
    letter-spacing: 0.2px;
}

.page-auth .btn-google::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.page-auth .btn-google:hover {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    box-shadow: 0 6px 28px rgba(6, 182, 212, 0.4);
    transform: translateY(-1px);
}

.page-auth .btn-google:hover::before {
    opacity: 1;
}

.page-auth .btn-google:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 12px rgba(6, 182, 212, 0.2);
}

.page-auth .btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-auth .btn-google .btn-google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-auth .btn-google .btn-google-icon svg {
    width: 14px;
    height: 14px;
}

/* 로딩 스피너 */
.page-auth .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 하단 */
.page-auth .auth-footer {
    margin-top: 20px;
    text-align: center;
}

.page-auth .auth-footer p {
    font-size: 11px;
    color: #1e293b;
    letter-spacing: 1px;
}

/* 뱃지 */
.page-auth .auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 100px;
    padding: 4px 12px 4px 8px;
    font-size: 11px;
    color: #22d3ee;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

.page-auth .auth-badge .badge-dot {
    width: 6px;
    height: 6px;
    background: #06b6d4;
    border-radius: 50%;
    animation: badge-blink 2s ease-in-out infinite;
}

@keyframes badge-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

@media (max-width: 480px) {
    .page-auth {
        align-items: flex-start;
        padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
    }

    .page-auth .auth-wrap {
        max-width: 100%;
        padding: 0 14px;
    }

    .page-auth .auth-badge {
        margin-bottom: 20px;
    }

    .page-auth .auth-logo {
        margin-bottom: 24px;
    }

    .page-auth .auth-logo-mark {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }

    .page-auth .auth-logo-mark .ring:nth-child(2) {
        inset: -6px;
    }

    .page-auth .auth-logo-mark .ring:nth-child(3) {
        inset: -12px;
    }

    .page-auth .auth-brand {
        font-size: 24px;
    }

    .page-auth .auth-tagline {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .page-auth .auth-card {
        border-radius: 14px;
        padding: 26px 18px 22px;
    }

    .page-auth .auth-card-header {
        margin-bottom: 22px;
    }

    .page-auth .btn-google {
        min-height: 52px;
        padding: 14px 16px;
    }

    .page-auth .auth-features {
        grid-template-columns: 1fr;
    }

    .page-auth .inapp-actions {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 360px), (max-height: 640px) {
    .page-auth {
        padding-top: 12px;
    }

    .page-auth .auth-badge {
        margin-bottom: 16px;
    }

    .page-auth .auth-logo {
        margin-bottom: 18px;
    }

    .page-auth .auth-logo-mark {
        width: 54px;
        height: 54px;
        margin-bottom: 12px;
    }

    .page-auth .auth-card {
        padding: 22px 16px 20px;
    }

    .page-auth .btn-google {
        gap: 8px;
        font-size: 14px;
    }
}

@media (max-height: 560px) {
    .page-auth {
        padding-top: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .page-auth .auth-badge,
    .page-auth .auth-footer {
        display: none;
    }

    .page-auth .auth-logo {
        margin-bottom: 14px;
    }

    .page-auth .auth-logo-mark {
        width: 46px;
        height: 46px;
        margin-bottom: 10px;
    }

    .page-auth .auth-brand {
        font-size: 22px;
    }

    .page-auth .auth-card {
        padding: 20px 16px 18px;
    }
}
