﻿/* UC彩票大廳樣式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #feca57;
    --dark-bg: #2c3e50;
    --light-bg: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 主容器背景動畫 */
.lottery-lobby {
    position: relative;
    background: url('/img/games/uclotterylobby.png') center/cover no-repeat fixed;
    min-height: 100vh;
    overflow: hidden;
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% {
        background-position: center center;
    }

    25% {
        background-position: center 10%;
    }

    50% {
        background-position: center center;
    }

    75% {
        background-position: center 90%;
    }
}

/* 動態光點效果 */
.lottery-lobby > *:first-child::before {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
    animation: lightMove 20s ease-in-out infinite;
}

/* 背景遮罩層 */
.lottery-lobby::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient( 135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100% );
    z-index: 1;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.6;
    }
}

/* 動態粒子效果 */
.lottery-lobby::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent), radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent), radial-gradient(1px 1px at 50px 90px, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200px 200px;
    animation: particleMove 15s linear infinite;
    z-index: 2;
}

@keyframes particleMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-200px, -200px);
    }
}

/* 確保內容在動畫層之上 */
.lottery-lobby > * {
    position: relative;
    z-index: 3;
}

/* 頂部橫幅區域 */
.lobby-header {
    padding: 60px 0;
    color: var(--text-light);
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    /*backdrop-filter: blur(2px);*/
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.lottery-logo {
    display: inline-flex;
    align-items: center;
    font-size: 3rem;
    margin-bottom: 20px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.lottery-logo i {
    margin-right: 15px;
    color: var(--accent-color);
    animation: rotateLogo 4s linear infinite;
}

@keyframes rotateLogo {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.lobby-title {
    margin-bottom: 30px;
}

.title-main {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title-sub {
    display: block;
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* 特色功能網格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    animation: featureAppear 0.6s ease-out backwards;
}

    .feature-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .feature-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .feature-item:nth-child(3) {
        animation-delay: 0.3s;
    }

    .feature-item:nth-child(4) {
        animation-delay: 0.4s;
    }

@keyframes featureAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-item i {
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

/* 遊戲選擇區域 */
.game-selection {
    padding: 80px 0;
    /*background: rgba(255, 255, 255, 0.95);*/
    /*backdrop-filter: blur(10px);*/
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeIn 1s ease-out;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.title-icon {
    font-size: 3rem;
    margin-right: 10px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.section-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
}

/* 遊戲卡片 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    cursor: pointer;
    animation: cardSlideIn 0.8s ease-out backwards;
}

.game-card-2min {
    background: var(--gradient-primary);
    animation-delay: 0.2s;
}

.game-card-5min {
    background: var(--gradient-secondary);
    animation-delay: 0.4s;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.game-card-inner {
    padding: 40px;
    color: white;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 30px;
}

.game-icon {
    font-size: 3rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.game-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

    .game-badge.hot {
        background: #ff6b6b;
        animation: glow 2s ease-in-out infinite;
    }

    .game-badge.premium {
        background: #feca57;
        color: #2c3e50;
    }

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.8);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    }
}

.game-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.game-features {
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}

    .feature i {
        margin-right: 10px;
        font-size: 1.2rem;
    }

.game-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 遊戲按鈕 */
.game-btn {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .game-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .game-btn:hover::before {
        width: 300px;
        height: 300px;
    }

.game-btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.game-btn-secondary {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.game-btn:hover {
    transform: translateX(5px);
}

.game-btn i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.game-btn:hover i {
    transform: translateX(5px);
}

/* 背景裝飾圖案 */
.game-bg-pattern {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* 資訊區塊 */
.game-info-section {
    padding: 80px 0;
    /*background: var(--light-bg);*/
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: infoCardAppear 0.8s ease-out backwards;
}

    .info-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .info-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .info-card:nth-child(3) {
        animation-delay: 0.3s;
    }

@keyframes infoCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.info-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: iconRotate 3s ease-in-out infinite;
}

@keyframes iconRotate {
    0%, 100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.info-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffcc00;
}

.info-card p {
    color: white;
    line-height: 1.6;
}

/* 底部CTA區域 */
.bottom-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .bottom-cta::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: ctaRotate 20s linear infinite;
    }

@keyframes ctaRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.cta-content {
    position: relative;
    z-index: 1;
}

    .cta-content h3 {
        color: #ffcc00;
        margin-bottom: 20px;
        animation: fadeInUp 1s ease-out;
    }

    .cta-content p {
        font-size: 1.2rem;
        margin-bottom: 40px;
        opacity: 0.9;
        animation: fadeInUp 1s ease-out 0.2s backwards;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: ctaBtnAppear 0.8s ease-out 0.4s backwards;
}

    .cta-btn:nth-child(2) {
        animation-delay: 0.6s;
    }

@keyframes ctaBtnAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cta-btn-primary {
    background: white;
    color: #667eea;
}

.cta-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-btn i {
    margin-right: 10px;
    font-size: 1.3rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .lottery-logo {
        font-size: 2rem;
    }

    .title-main {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-card-inner {
        padding: 30px;
    }

    .cta-content h3 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* 載入動畫 */
.animate-in {
    animation: fadeInScale 0.6s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
