/* 主頁樣式 - 運營級別設計 */

/* 頂部導航 */
.top-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.nav-left .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color, #667eea);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-left .logo:hover {
    color: var(--primary-dark, #764ba2);
    transform: scale(1.05);
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-center {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
}

.search-bar {
    display: flex;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-color, #1f2937);
}

.search-input::placeholder {
    color: var(--text-muted, #6b7280);
}

.search-btn {
    padding: 12px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.language-selector {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg, #ffffff);
    color: var(--text-color, #1f2937);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector:hover {
    border-color: var(--primary-color);
}

.user-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 主要內容 */
.main-content {
    min-height: calc(100vh - 80px);
}

/* 英雄區域 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    font-size: 1.2rem;
}

.quick-join-section {
    text-align: left;
}

.quick-join-title {
    font-size: 1rem;
    margin-bottom: 16px;
    opacity: 0.8;
}

.quick-join-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-join-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-join-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 300px;
}

.card-item {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.card-item:nth-child(1) {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.card-item:nth-child(2) {
    top: 20px;
    right: 20px;
    animation-delay: 1.5s;
}

.card-item:nth-child(3) {
    bottom: 20px;
    left: 20px;
    animation-delay: 3s;
}

.card-item:nth-child(4) {
    bottom: 20px;
    right: 20px;
    animation-delay: 4.5s;
}

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

/* 遊戲區域 */
.games-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-color);
}

.game-category {
    margin-bottom: 60px;
}

.game-category.featured {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 80px;
}

.game-category.featured .category-title {
    color: white;
    margin-bottom: 30px;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.games-grid .game-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.games-grid .game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.games-grid .game-card .game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.games-grid .game-card .game-info h3 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.games-grid .game-card .game-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* 遊戲按鈕 */
.game-btn {
    background: var(--white);
    border: none;
    border-radius: var(--radius-large);
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.game-btn:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.game-btn:active {
    transform: translateY(-4px);
}

.game-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.game-btn:hover::before {
    left: 100%;
}

.game-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.game-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--dark-bg);
    margin-bottom: var(--spacing-xs);
}

.game-description {
    font-size: var(--font-size-sm);
    color: var(--gray-dark);
    line-height: 1.4;
}

/* 特殊遊戲按鈕樣式 */
.game-btn.featured {
    background: var(--gradient-primary);
    color: var(--white);
}

.game-btn.featured .game-title,
.game-btn.featured .game-description {
    color: var(--white);
}

.game-btn.coming-soon {
    background: var(--gray-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.game-btn.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow-medium);
}

.coming-soon-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--warning-color);
    color: var(--white);
    padding: 2px 8px;
    border-radius: var(--radius-small);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.game-btn.featured {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.game-stats {
    margin-top: 12px;
}

.online-count {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
}

/* 公告區域樣式 */
.announcement-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 0;
    position: relative;
    overflow: hidden;
}

.announcement-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.announcement-content {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.announcement-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    animation: pulse 2s infinite;
}

.announcement-text {
    flex: 1;
    color: white;
}

.announcement-title {
    font-weight: bold;
    margin-right: 8px;
}

.announcement-message {
    opacity: 0.9;
}

.announcement-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.announcement-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* 用戶區域樣式 */
.user-area {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.login-btn {
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
}

.login-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.register-btn {
    background: #007bff;
    color: white;
}

.register-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.user-menu-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.user-menu-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* 認證表單樣式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* 陌生人匹配樣式 */
.stranger-match-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.match-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.match-status {
    text-align: center;
    margin-bottom: 30px;
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

.status-text {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
}

.match-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.match-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.match-btn.start {
    background: #28a745;
    color: white;
}

.match-btn.start:hover {
    background: #218838;
    transform: translateY(-2px);
}

.match-btn.stop {
    background: #dc3545;
    color: white;
}

.match-btn.stop:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.chat-area {
    border-top: 2px solid #eee;
    padding-top: 20px;
}

.next-stranger-btn {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.next-stranger-btn:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 陌生人聊天樣式 */
.stranger-chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.stranger-chat-input-area {
    display: flex;
    gap: 12px;
    align-items: center;
}

.stranger-chat-messages .chat-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    position: relative;
}

.stranger-chat-messages .chat-message.system {
    background: #e3f2fd;
    color: #1976d2;
    text-align: center;
    max-width: 100%;
    font-style: italic;
    border-radius: 6px;
}

.stranger-chat-messages .chat-message.user {
    background: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.stranger-chat-messages .chat-message.stranger {
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
}

.stranger-chat-messages .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
    opacity: 0.8;
}

.stranger-chat-messages .sender-name {
    font-weight: 600;
}

.stranger-chat-messages .message-time {
    font-size: 11px;
}

.stranger-chat-messages .message-text {
    display: block;
    line-height: 1.4;
}

/* 聊天輸入區域優化 */
.stranger-chat-input-area .chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.stranger-chat-input-area .chat-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stranger-chat-input-area .chat-input:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.stranger-chat-input-area .chat-send-btn {
    background: #007bff;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.stranger-chat-input-area .chat-send-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: scale(1.05);
}

.stranger-chat-input-area .chat-send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* 滾動條樣式 */
.stranger-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.stranger-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.stranger-chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.stranger-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 聊天區域 */
.chat-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chat-section .section-title {
    color: white;
    margin-bottom: 40px;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
}

.chat-message {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.chat-message.system {
    background: rgba(255, 255, 255, 0.2);
    font-style: italic;
    text-align: center;
}

.chat-input-area {
    display: flex;
    padding: 20px;
    gap: 12px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.chat-send-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* 修復文字顏色問題 */
.hero-title {
    color: #333 !important;
    text-shadow: none;
}

.hero-subtitle {
    color: #666 !important;
}

.search-input {
    color: #333 !important;
    background: white !important;
}

.action-btn {
    color: white !important;
}

.action-btn.secondary {
    color: #007bff !important;
    background: white !important;
    border: 2px solid #007bff !important;
}

.stat-label {
    color: #666 !important;
}

.stat-number {
    color: #333 !important;
}

/* Safari 和 iPhone 優化 */
@supports (-webkit-appearance: none) {
    /* Safari 特定樣式 */
    .input-field, .search-input {
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    .btn, .action-btn, .match-btn {
        -webkit-appearance: none;
        border-radius: 8px;
    }
}

/* iOS 優化 */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    /* 高分辨率屏幕優化 */
    .announcement-content {
        backdrop-filter: blur(20px);
    }
    
    .match-container {
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    }
}

/* iPhone 觸摸優化 */
@media (max-width: 768px) {
    .auth-btn, .match-btn, .action-btn {
        min-height: 44px; /* iOS 推薦的最小觸摸目標 */
        font-size: 16px; /* 防止 iOS 縮放 */
    }
    
    .input-field, .search-input {
        min-height: 44px;
        font-size: 16px; /* 防止 iOS 縮放 */
    }
    
    .announcement-content {
        padding: 16px;
        margin: 0 10px;
    }
    
    .match-container {
        margin: 0 20px;
        padding: 30px 20px;
    }
    
    .user-area {
        margin-left: 10px;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .user-profile {
        padding: 6px 10px;
    }
    
    .user-stats {
        flex-direction: column;
        gap: 2px;
    }
}

/* 防止 iOS Safari 縮放 */
@media screen and (max-device-width: 480px) {
    select, input, textarea {
        font-size: 16px !important;
    }
}

/* 改善觸摸反饋 */
.btn, .action-btn, .match-btn, .auth-btn {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

/* 滾動優化 */
.chat-messages, .stranger-chat-messages {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 修復語言選擇器樣式 */
.language-select {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

/* 在線統計樣式優化 */
.online-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #007bff !important;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666 !important;
    font-weight: 500;
}

/* 頁腳 */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    color: var(--text-color);
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section p,
.footer-section ul {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-note {
    margin-top: 8px;
    font-size: 12px;
    font-style: italic;
}

/* 模態框樣式 */
.avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.avatar-display {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.user-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    min-width: 80px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    max-width: 400px;
}

.avatar-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.room-settings {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .nav-center {
        margin: 0 20px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }
    
    .nav-center {
        order: 3;
        margin: 0;
        width: 100%;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .floating-cards {
        width: 200px;
        height: 200px;
    }
    
    .card-item {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .section-container {
        padding: 0 16px;
    }
    
    .games-section,
    .chat-section {
        padding: 60px 0;
    }
}

/* 動畫效果 */
.game-btn {
    animation: slideUp 0.6s ease-out;
}

.game-btn:nth-child(1) { animation-delay: 0.1s; }
.game-btn:nth-child(2) { animation-delay: 0.2s; }
.game-btn:nth-child(3) { animation-delay: 0.3s; }
.game-btn:nth-child(4) { animation-delay: 0.4s; }

.room-section {
    animation: fadeIn 0.8s ease-out;
}

.main-header {
    animation: slideUp 1s ease-out;
}

/* 載入狀態 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

.loading-text {
    font-size: var(--font-size-lg);
    font-weight: 600;
}