/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0F0F1A;
    color: #FFFFFF;
}

/* 应用布局 */
.app {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background-color: #14142B;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 32px;
    padding: 0 12px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    color: #C3C3C3;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item i {
    width: 20px;
}

.nav-item:hover {
    background-color: rgba(123, 97, 255, 0.1);
    color: #FFFFFF;
}

.nav-item.active {
    background-color: #7B61FF;
    color: #FFFFFF;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
}

/* 顶部导航栏 */
.topbar {
    background-color: #14142B;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 语言选择器样式 */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #1F1F2E;
    border: 1px solid #2A2A3E;
    color: #FFFFFF;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 80px;
    justify-content: center;
}

.language-btn:hover {
    background-color: #2A2A3E;
    border-color: #7B61FF;
}

.language-btn i.fas.fa-globe {
    font-size: 14px;
    color: #7B61FF;
}

.language-btn .current-lang {
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

.language-btn i.fas.fa-chevron-down {
    font-size: 10px;
    color: #C3C3C3;
    transition: transform 0.3s ease;
}

.language-selector:hover .language-btn i.fas.fa-chevron-down {
    transform: rotate(180deg);
}

/* 语言下拉菜单 */
.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1F1F2E;
    border: 1px solid #2A2A3E;
    border-radius: 8px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.language-option:hover {
    background-color: rgba(123, 97, 255, 0.1);
}

.language-option .flag {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.language-option .lang-text {
    color: #FFFFFF;
    font-weight: 400;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #1F1F2E;
    border-radius: 8px;
    padding: 8px 16px;
    width: 400px;
}

.search-box i {
    color: #C3C3C3;
    margin-right: 12px;
}

.search-box input {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: #C3C3C3;
}

.login-btn {
    background-color: #4C4CFF;
    color: #FFFFFF;
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #3D3DFF;
}

/* 功能展示栏 */
.utility-bar {
    background-color: #14142B;
    padding: 16px 24px;
    display: flex;
    gap: 32px;
    border-top: 1px solid #1F1F2E;
}

.utility-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #C3C3C3;
}

.utility-item i {
    font-size: 18px;
}

/* 分享按钮样式 */
.share-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.share-btn:hover {
    background-color: rgba(123, 97, 255, 0.1);
    border-color: #7B61FF;
    color: #7B61FF;
    transform: translateY(-2px);
}

.share-btn:hover i {
    color: #7B61FF;
}

/* 分享模态框样式 */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(8px);
}

.share-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 26, 0.9), rgba(20, 20, 43, 0.95));
    cursor: pointer;
}

.share-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1A1A2E, #16213E);
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(123, 97, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(123, 97, 255, 0.3);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(123, 97, 255, 0.2);
    position: relative;
}

.share-modal-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #7B61FF, #9D7AFF);
    border-radius: 1px;
}

.share-modal-header h3 {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #FFFFFF, #E0E6FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-modal-header h3::before {
    content: '🚀';
    font-size: 20px;
    filter: none;
    -webkit-text-fill-color: initial;
}

.share-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #C3C3C3;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.share-modal-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.2);
    border-color: #7B61FF;
    transform: rotate(90deg) scale(1.1);
}

.share-modal-body {
    margin-bottom: 0;
}

.share-modal-body p {
    color: #B8B8D1;
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 16px;
    text-align: center;
    font-weight: 400;
}

.url-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.url-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #7B61FF, #9D7AFF, #7B61FF);
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.url-container:hover::before {
    opacity: 1;
}

#shareUrl {
    flex: 1;
    background: rgba(31, 31, 46, 0.8);
    border: 1px solid rgba(123, 97, 255, 0.3);
    border-radius: 8px;
    padding: 16px 20px;
    color: #FFFFFF;
    font-size: 14px;
    font-family: 'Inter', monospace;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

#shareUrl:focus {
    border-color: #7B61FF;
    box-shadow: 
        0 0 0 3px rgba(123, 97, 255, 0.2),
        0 4px 12px rgba(123, 97, 255, 0.3);
    background: rgba(31, 31, 46, 0.95);
}

#shareUrl:hover {
    border-color: rgba(123, 97, 255, 0.5);
}

.copy-btn {
    background: linear-gradient(135deg, #7B61FF, #9D7AFF);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    justify-content: center;
}

.copy-btn::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;
}

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

.copy-btn:hover {
    background: linear-gradient(135deg, #6B51E6, #8A6AFF);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

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

.copy-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(33, 208, 122, 0.15), rgba(33, 208, 122, 0.25));
    border: 1px solid rgba(33, 208, 122, 0.3);
    border-radius: 8px;
    padding: 12px 20px;
    color: #21D07A;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-feedback i {
    font-size: 16px;
    animation: checkmark 0.6s ease-in-out;
}

/* 分享模态框动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* 响应式分享模态框 */
@media (max-width: 768px) {
    .share-modal-content {
        width: 95%;
        margin: 20px;
        padding: 24px;
        border-radius: 16px;
    }
    
    .share-modal-header h3 {
        font-size: 20px;
    }
    
    .url-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .copy-btn {
        width: 100%;
        padding: 16px;
        min-width: unset;
    }
    
    #shareUrl {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .share-modal-content {
        width: 100%;
        margin: 15px;
        padding: 20px;
        border-radius: 12px;
    }
    
    .share-modal-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .share-modal-header h3 {
        font-size: 18px;
    }
    
    .share-modal-close {
        font-size: 16px;
        width: 36px;
        height: 36px;
    }
    
    .share-modal-body p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    #shareUrl {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .copy-btn {
        padding: 14px;
        font-size: 13px;
    }
    
    .copy-feedback {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* 游戏内容区 */
.content {
    padding: 24px;
}

.game-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.view-more {
    color: #7B61FF;
    text-decoration: none;
    font-weight: 500;
}

/* 搜索功能相关样式 */
.search-status {
    background-color: #1F1F2E;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 24px;
    border: 1px solid #2A2A3E;
    display: none;
}

.search-status.show {
    display: block;
}

.search-status-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-status-icon {
    font-size: 18px;
    color: #7B61FF;
}

.search-status-text {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
}

.search-status-count {
    color: #C3C3C3;
    font-size: 14px;
    margin-left: auto;
}

.clear-search-btn {
    background-color: transparent;
    color: #7B61FF;
    border: 1px solid #7B61FF;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.clear-search-btn:hover {
    background-color: #7B61FF;
    color: #FFFFFF;
}

/* 无搜索结果样式 */
.no-results {
    background-color: #1F1F2E;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    border: 1px solid #2A2A3E;
    grid-column: 1 / -1;
    max-width: 500px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 48px;
    color: #7B61FF;
    margin-bottom: 16px;
    opacity: 0.7;
}

.no-results-title {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.no-results-message {
    color: #C3C3C3;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.no-results-suggestions {
    background-color: rgba(123, 97, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.no-results-suggestions h4 {
    color: #7B61FF;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.no-results-suggestions li {
    color: #C3C3C3;
    font-size: 13px;
    padding: 4px 0;
    position: relative;
    padding-left: 16px;
}

.no-results-suggestions li:before {
    content: "•";
    color: #7B61FF;
    position: absolute;
    left: 0;
}

/* 搜索加载状态 */
.search-loading {
    display: none;
    background-color: #1F1F2E;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #2A2A3E;
    grid-column: 1 / -1;
    margin: 20px 0;
}

.search-loading.show {
    display: block;
}

.search-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #2A2A3E;
    border-radius: 50%;
    border-top-color: #7B61FF;
    animation: spin 1s ease-in-out infinite;
    margin-right: 12px;
}

.search-loading-text {
    color: #C3C3C3;
    font-size: 14px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 搜索结果高亮 */
.search-highlight {
    background-color: rgba(123, 97, 255, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    color: #FFFFFF;
    font-weight: 500;
}

/* 搜索框增强样式 */
.search-box.active {
    border: 1px solid #7B61FF;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}

.search-box .search-clear {
    color: #C3C3C3;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: none;
}

.search-box .search-clear.show {
    display: block;
}

.search-box .search-clear:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 响应式搜索样式 */
@media (max-width: 768px) {
    .search-status {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .search-status-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .search-status-count {
        margin-left: 0;
        margin-top: 4px;
    }
    
    .no-results {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .no-results-icon {
        font-size: 40px;
    }
    
    .no-results-title {
        font-size: 18px;
    }
    
    .no-results-message {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-status {
        padding: 10px 12px;
    }
    
    .search-status-text {
        font-size: 14px;
    }
    
    .search-status-count {
        font-size: 12px;
    }
    
    .no-results {
        padding: 24px 16px;
        border-radius: 8px;
    }
    
    .no-results-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .no-results-title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .no-results-message {
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    .no-results-suggestions {
        padding: 12px;
    }
}

/* 游戏模态框样式 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    background-color: #14142B;
    border-radius: 12px;
    padding: 20px;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #FFFFFF;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

.close-button:hover {
    color: #7B61FF;
}

.game-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 95%;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 5px;
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #7B61FF;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #6B51E6;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(123, 97, 255, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* 返回顶部按钮响应式 */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 25px;
        right: 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 14px;
    }
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.game-card {
    background-color: #14142B;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateY(-4px);
}

.game-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 比例 */
}

.game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.hot {
    background-color: #FF6D3A;
}

.badge.new {
    background-color: #7B61FF;
}

.badge.updated {
    background-color: #21D07A;
}

.game-card h3 {
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .search-box {
        width: 300px;
    }
    
    /* 语言选择器移动端适配 */
    .top-actions {
        gap: 12px;
    }
    
    .language-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .language-dropdown {
        min-width: 160px;
        right: -10px;
    }
    
    .language-option {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .search-box {
        width: 200px;
    }

    .utility-bar {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    /* 语言选择器小屏幕适配 */
    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .top-actions {
        gap: 8px;
    }
    
    .language-btn {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 60px;
        gap: 4px;
    }
    
    .language-btn .current-lang {
        min-width: 20px;
    }
    
    .language-dropdown {
        min-width: 140px;
        right: -5px;
    }
    
    .language-option {
        padding: 6px 10px;
        font-size: 12px;
        gap: 8px;
    }
    
    .language-option .flag {
        font-size: 14px;
        width: 16px;
    }
} 