/* 登入頁面 */
#loginPage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: 
        radial-gradient(ellipse 1200px 800px at 70% 20%, rgba(30, 120, 200, 0.6) 0%, rgba(30, 90, 160, 0.3) 40%, transparent 70%),
        radial-gradient(ellipse 900px 700px at 30% 70%, rgba(139, 92, 46, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse 1000px 900px at 50% 50%, rgba(10, 40, 80, 0.4) 0%, transparent 70%),
        radial-gradient(circle 400px at 85% 80%, rgba(255, 180, 50, 0.15) 0%, transparent 50%),
        radial-gradient(circle 350px at 15% 15%, rgba(100, 180, 255, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, #000000 0%, #0a0e1a 30%, #0d1520 60%, #000000 100%);
    position: relative;
    overflow: hidden;
}

/* 強烈藍色聚光燈效果（模擬圖片） */
#loginPage::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 150%;
    height: 150%;
    background: 
        radial-gradient(ellipse 50% 35% at 65% 25%, 
            rgba(100, 180, 255, 0.4) 0%,
            rgba(50, 140, 230, 0.3) 15%,
            rgba(30, 100, 200, 0.2) 30%,
            rgba(20, 80, 160, 0.1) 45%,
            transparent 60%
        );
    pointer-events: none;
    z-index: 1;
    animation: spotlightPulse 6s ease-in-out infinite;
    filter: blur(30px);
}

@keyframes spotlightPulse {
    0%, 100% { 
        opacity: 0.9;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
    }
}

/* 撲克牌背景元素 - 模擬圖片中的立體卡牌 */
#loginPage::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 320px;
    top: 12%;
    left: 12%;
    transform: rotate(-20deg) perspective(1000px) rotateY(-8deg);
    animation: cardFloat 7s ease-in-out infinite;
    z-index: 2;
    
    background: 
        linear-gradient(135deg, rgba(15, 15, 25, 1) 0%, rgba(25, 25, 40, 0.98) 50%, rgba(20, 20, 35, 1) 100%),
        repeating-conic-gradient(from 0deg at 50% 50%, 
            rgba(255, 180, 50, 0.25) 0deg,
            rgba(200, 140, 30, 0.18) 15deg,
            rgba(255, 180, 50, 0.25) 30deg,
            rgba(200, 140, 30, 0.18) 45deg
        ),
        repeating-linear-gradient(45deg, transparent, transparent 1.5px, rgba(255, 180, 50, 0.08) 1.5px, rgba(255, 180, 50, 0.08) 3px);
    
    border: 4px solid rgba(255, 180, 50, 0.8);
    border-radius: 14px;
    box-shadow: 
        -5px 15px 50px rgba(0, 0, 0, 0.9),
        5px -5px 30px rgba(30, 120, 200, 0.4),
        inset 0 0 60px rgba(255, 180, 50, 0.15),
        inset -3px 3px 10px rgba(255, 255, 255, 0.1),
        inset 3px -3px 10px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 180, 50, 0.5),
        0 0 80px rgba(30, 120, 200, 0.3);
    
    filter: drop-shadow(0 0 20px rgba(255, 180, 50, 0.4));
}

@keyframes cardFloat {
    0%, 100% {
        transform: rotate(-20deg) perspective(1000px) rotateY(-8deg) translateY(0);
    }
    50% {
        transform: rotate(-18deg) perspective(1000px) rotateY(-5deg) translateY(-15px);
    }
}

/* 撲克牌裝飾 - 3D 翻轉效果 */
.card-decoration {
    position: absolute;
    width: 160px;
    height: 230px;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    cursor: pointer;
    z-index: 3;
}

/* 第一張牌 - 方塊 K */
#loginPage > .card-decoration:nth-of-type(4) {
    width: 180px;
    height: 260px;
    top: 28%;
    right: 18%;
    transform: rotate(-28deg);
    animation: cardFloat2 8s ease-in-out infinite;
}

/* 第二張牌 - 黑桃 A */
#loginPage > .card-decoration:nth-of-type(5) {
    width: 155px;
    height: 225px;
    bottom: 22%;
    left: 16%;
    transform: rotate(32deg);
    animation: cardFloat3 9s ease-in-out infinite reverse;
}

/* 撲克牌背面設計 */
.card-decoration .card-back {
    background: 
        linear-gradient(135deg, rgba(20, 20, 35, 1) 0%, rgba(30, 30, 45, 0.98) 50%, rgba(25, 25, 40, 1) 100%),
        repeating-conic-gradient(from 30deg at 50% 50%, 
            rgba(255, 180, 50, 0.22) 0deg, 
            rgba(200, 140, 30, 0.15) 18deg, 
            rgba(255, 180, 50, 0.22) 36deg,
            rgba(200, 140, 30, 0.15) 54deg
        ),
        repeating-radial-gradient(circle at 50% 50%, 
            transparent 0px, 
            transparent 8px, 
            rgba(255, 180, 50, 0.06) 8px, 
            rgba(255, 180, 50, 0.06) 9px
        );
    
    border: 4px solid rgba(255, 180, 50, 0.75);
    box-shadow: 
        -8px 12px 55px rgba(0, 0, 0, 0.85),
        8px -8px 35px rgba(30, 120, 200, 0.35),
        inset 0 0 55px rgba(255, 180, 50, 0.18),
        inset -2px 2px 8px rgba(255, 255, 255, 0.12),
        inset 2px -2px 8px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(255, 180, 50, 0.45),
        0 0 70px rgba(30, 120, 200, 0.25);
}

/* 撲克牌背面中央金色圓形圖案 */
.card-decoration .card-back::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 65%;
    height: 65%;
    transform: translate(-50%, -50%) rotate(45deg);
    background: 
        radial-gradient(circle at 50% 50%, rgba(255, 180, 50, 0.4) 0%, rgba(255, 180, 50, 0.2) 35%, transparent 70%),
        repeating-conic-gradient(from 0deg at 50% 50%, 
            rgba(255, 180, 50, 0.25) 0deg, 
            transparent 12deg, 
            rgba(200, 140, 30, 0.25) 24deg,
            transparent 36deg
        );
    border: 2.5px solid rgba(255, 180, 50, 0.5);
    border-radius: 50%;
    box-shadow: 
        inset 0 0 30px rgba(255, 180, 50, 0.3),
        0 0 25px rgba(255, 180, 50, 0.25),
        0 0 50px rgba(30, 120, 200, 0.15);
}

/* 撲克牌背面內邊框 */
.card-decoration .card-back::after {
    content: '';
    position: absolute;
    inset: 14px;
    border: 2.5px solid rgba(255, 180, 50, 0.6);
    border-radius: 9px;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 2.5px, rgba(255, 180, 50, 0.05) 2.5px, rgba(255, 180, 50, 0.05) 5px),
        repeating-linear-gradient(-45deg, transparent, transparent 2.5px, rgba(200, 140, 30, 0.05) 2.5px, rgba(200, 140, 30, 0.05) 5px);
    box-shadow: 
        inset 0 0 20px rgba(255, 180, 50, 0.2),
        inset 0 2px 6px rgba(255, 255, 255, 0.08);
}

@keyframes cardFloat2 {
    0%, 100% {
        transform: rotate(-28deg) translateY(0);
    }
    50% {
        transform: rotate(-25deg) translateY(-18px);
    }
}

@keyframes cardFloat3 {
    0%, 100% {
        transform: rotate(32deg) translateY(0);
    }
    50% {
        transform: rotate(30deg) translateY(-20px);
    }
}

.card-decoration:hover {
    filter: brightness(1.2) drop-shadow(0 0 40px rgba(100, 180, 255, 0.6));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotation, 0deg));
    }
    50% {
        transform: translateY(-20px) rotate(calc(var(--rotation, 0deg) + 5deg));
    }
}

.login-container {
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.98) 0%, 
            rgba(250, 250, 255, 0.96) 50%, 
            rgba(255, 255, 255, 0.98) 100%);
    border: 2px solid rgba(255, 180, 50, 0.4);
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.8),
        0 10px 40px rgba(30, 120, 200, 0.4),
        0 0 60px rgba(100, 180, 255, 0.3),
        0 0 100px rgba(255, 180, 50, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(200, 200, 220, 0.5);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(135deg, 
        rgba(255, 180, 50, 0.7) 0%, 
        rgba(100, 180, 255, 0.5) 50%, 
        rgba(255, 180, 50, 0.7) 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.login-container:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 
        0 35px 90px rgba(0, 0, 0, 0.9),
        0 15px 50px rgba(30, 120, 200, 0.5),
        0 0 80px rgba(100, 180, 255, 0.4),
        0 0 120px rgba(255, 180, 50, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-container h1 {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    color: #1A1A1A;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
}

#loginForm button {
    margin-top: 8px;
}

@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
    }
}
