:root {
    --gn-gold: #D4AF37;
    --gn-dark: #1a1a1a;
    --gn-card: #2d2d2d;
    --gn-border: rgba(212, 175, 55, 0.3);
    --gn-text: #ffffff;
    --gn-text-muted: rgba(255, 255, 255, 0.7);
    --gn-success: #1DC078;
    --gn-danger: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    color: var(--gn-text);
    position: relative;
    overflow-x: hidden;
}

    /* 背景動畫效果 */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(29, 192, 120, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
        animation: backgroundFloat 20s ease-in-out infinite;
        z-index: -1;
    }

@keyframes backgroundFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(1deg);
    }

    66% {
        transform: translateY(10px) rotate(-1deg);
    }
}

/* 登入容器 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gn-border);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

    .login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--gn-gold), var(--gn-success), var(--gn-gold));
    }

.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gn-gold), #f4d03f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

    .login-logo i {
        font-size: 2.5rem;
        color: var(--gn-dark);
    }

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gn-gold);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gn-text-muted);
    font-size: 0.95rem;
}

.login-card .card-body {
    padding: 2rem;
}

/* 微信快速登入按鈕 */
.quick-login-container {
    text-align: center;
}

.btn-wechat {
    background: linear-gradient(135deg, #1AAD19, #07C160);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    box-shadow: 0 6px 20px rgba(26, 173, 25, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

    .btn-wechat:hover {
        background: linear-gradient(135deg, #15991a, #06b157);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(26, 173, 25, 0.4);
        color: white;
    }

    .btn-wechat:active {
        transform: translateY(0);
    }

    .btn-wechat::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .btn-wechat:hover::before {
        left: 100%;
    }

/* 登入提示 */
.login-hint {
    background: rgba(29, 192, 120, 0.05);
    border: 1px solid rgba(29, 192, 120, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.hint-content {
    display: flex;
    align-items: center;
    text-align: left;
}

.hint-icon {
    margin-right: 1rem;
    font-size: 2rem;
}

.hint-text h6 {
    color: #1DC078;
    margin-bottom: 0.5rem;
}

/* QR Code 區域 */
.qr-code-container {
    text-align: center;
    margin: 2rem 0;
    display: none;
}

.qr-code-frame {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border: 3px solid #1DC078;
    border-radius: 15px;
    background: white;
    box-shadow: 0 8px 25px rgba(29, 192, 120, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder {
    text-align: center;
    color: #666;
}

    .qr-placeholder i {
        font-size: 3rem;
        color: #1DC078;
        margin-bottom: 1rem;
    }

/* QR Code 狀態 */
.qr-status {
    text-align: center;
    margin-bottom: 1rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

    .status-indicator.scanning {
        background: rgba(29, 192, 120, 0.1);
        color: #1DC078;
    }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* 登入步驟 */
.login-steps {
    margin-top: 1.5rem;
}

.steps-title {
    color: var(--gn-gold);
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.steps-list {
    display: grid;
    gap: 1rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--gn-gold);
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--gn-gold);
    color: var(--gn-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.step-content strong {
    color: var(--gn-text);
    font-size: 0.9rem;
}

.step-content p {
    color: var(--gn-text-muted);
    font-size: 0.8rem;
    margin: 0.25rem 0 0 0;
}

/* 分隔線 */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0 1rem;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .divider span {
        background: var(--gn-card);
        color: rgba(255, 255, 255, 0.4);
        padding: 0 1rem;
        font-size: 0.8rem;
    }

/* 備用登入 */
.alternative-login .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    padding: 10px 20px;
}

    .alternative-login .btn-outline-secondary:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
        color: rgba(255, 255, 255, 0.8);
    }

/* 手動登入表單 */
.manual-login-form {
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: var(--gn-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gn-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

    .form-control:focus {
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--gn-gold);
        box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
        color: var(--gn-text);
    }

    .form-control::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

/* 響應式設計 */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-card .card-body {
        padding: 1.5rem;
    }

    .login-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .qr-code-frame {
        width: 180px;
        height: 180px;
    }
}

.text-muted {
    --bs-text-opacity: 1;
    color: var(--bs-white) !important;
}
