* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF6B35;
    text-decoration: none;
}

.logo-image {
    height: 50px;
    width: auto;
    margin-right: 0.5rem;
}

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

.logo-text {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-center {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #FF6B35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.2);
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    padding: 0.5rem;
    font-size: 1rem;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: #FF6B35;
    color: white;
    transform: translateY(-2px);
}

.nav-dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    z-index: 1001;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #FF6B35;
    padding-left: 1.5rem;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.login-btn {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

/* 首屏推荐区 */
.hero-section {
    margin-top: 80px;
    padding: 2rem 0;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.game-card.featured {
    height: 100%;
}

.game-image {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.game-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 3rem 2rem 2rem;
    width: 100%;
    color: white;
}

.game-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.play-btn {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.play-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}


/* 页脚 */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #FF6B35;
}

.footer-section a {
    display: block;
    color: #ccc;
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #FF6B35;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.icp-info {
    font-size: 0.9rem;
    color: #999;
    transition: color 0.3s ease;
}

.icp-info:hover {
    color: #FF6B35;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-center {
        order: 3;
        width: 100%;
        margin: 0;
    }

    .nav-right {
        order: 2;
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .hero-section {
        margin-top: 140px;
    }

    .carousel-container {
        height: 300px;
        margin: 0 1rem;
    }

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

    .game-description {
        font-size: 1rem;
    }

    .play-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 游戏小方块区域 */
.mini-games-section {
    margin-top: 80px;
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.95);
    min-height: 400px;
}

.mini-games-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.mini-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.mini-game-block {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
}

.mini-game-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mini-game-block:hover::before {
    transform: translateY(0);
}

.mini-game-block:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.mini-game-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    z-index: 1;
}

.mini-game-title {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    z-index: 1;
    margin: 0;
}

/* 游戏弹窗 */
.game-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 1% auto;
    padding: 0;
    border-radius: 15px;
    width: 95%;
    max-width: 1200px;
    height: 95vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(45deg, #FF6B35, #F7931E);
    color: white;
    padding: 1rem 2rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    flex: 1;
}

.modal-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.fullscreen-btn {
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
    opacity: 0.9;
    padding: 0.5rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    z-index: 10;
    position: relative;
}

.fullscreen-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

.close-btn {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
    padding: 0.3rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.close-btn:hover {
    transform: scale(1.2);
}

/* 全屏模式样式 */
.game-modal.fullscreen .modal-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
}

.game-modal.fullscreen .modal-header {
    border-radius: 0;
    padding: 0.5rem 1rem;
}

.game-modal.fullscreen .modal-header h3 {
    font-size: 1.2rem;
}

.game-modal.fullscreen .modal-body {
    height: calc(100vh - 50px);
}

.modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    border-radius: 0 0 15px 15px;
}

#gameFrame {
    border: none;
    width: 100%;
    height: 100%;
}

/* 游戏小方块响应式设计 */
@media (max-width: 768px) {
    .mini-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1rem;
    }

    .mini-game-icon {
        font-size: 2rem;
    }

    .mini-game-title {
        font-size: 0.8rem;
    }

    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }

    .modal-header {
        padding: 1rem;
        border-radius: 0;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .mini-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.8rem;
    }

    .mini-game-icon {
        font-size: 1.5rem;
    }

    .mini-game-title {
        font-size: 0.7rem;
    }

    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }

    .modal-header {
        border-radius: 0;
        padding: 0.8rem;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .close-btn {
        font-size: 1.5rem;
    }

    .modal-body {
        border-radius: 0;
    }

    #gameFrame {
        height: calc(100vh - 50px);
    }
}