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

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #000000;
    --secondary: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-main: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --border-color: #e0e0e0;
    --accent-red: rgba(255, 80, 80, 0.15);
    --accent-red-text: #cc4444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --radius-lg: 12px;
}

body.dark-mode {
    --primary: #ffffff;
    --secondary: #000000;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --bg-main: #1a1a1a;
    --bg-secondary: #111111;
    --bg-card: #222222;
    --border-color: #333333;
    --accent-red: rgba(255, 80, 80, 0.2);
    --accent-red-text: #ff6666;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.sidebar {
    width: 220px;
    background-color: var(--bg-main);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.4s ease;
}

.brand-logo {
    width: 180px;
    height: 100px;
    border-radius: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.light-logo {
    display: block;
}

.dark-logo {
    display: none;
}

body.dark-mode .light-logo {
    display: none;
}

body.dark-mode .dark-logo {
    display: block;
}

.nav-menu {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: var(--radius);
    transition: all 0.15s ease;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--secondary);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 4px;
    transition: background-color 0.4s ease;
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: border-color 0.4s ease;
}

.login-btn span {
    margin-left: 2px;
}

.theme-toggle {
    position: relative;
}

.theme-toggle .nav-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    transition: opacity 0.3s ease;
}

.sun-icon {
    opacity: 1;
}

.moon-icon {
    opacity: 0;
}

body.dark-mode .sun-icon {
    opacity: 0;
}

body.dark-mode .moon-icon {
    opacity: 1;
}

.main-content {
    margin-left: 220px;
    padding: 0;
    width: calc(100vw - 220px);
    box-sizing: border-box;
    transition: background-color 0.4s ease;
}

.hero-section {
    position: relative;
    text-align: center;
    padding: 0 0 100px;
    margin: 0 0 80px;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.software-section,
.servers-section,
.gallery-section,
.supporters-section,
.recruit-section,
.footer {
    padding-left: 60px;
    padding-right: 60px;
}

.team-modes-section {
    padding-left: 60px;
    padding-right: 60px;
    margin-bottom: 40px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('blackground.png');
    background-size: cover;
    background-position: center;
    filter: blur(6px);
    z-index: 0;
    transform: scale(1.05);
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(2px);
    z-index: 1;
}

body.dark-mode .hero-section::before {
    background-image: url('blackground black.png');
    filter: blur(6px) brightness(0.6);
    transform: scale(1.05);
}

body.dark-mode .hero-section::after {
    background: rgba(0, 0, 0, 0.25);
}

.hero-logo,
.hero-title,
.hero-description,
.hero-buttons {
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 480px;
    height: 270px;
    margin: 0;
    border-radius: 24px;
    object-fit: contain;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin: -40px 0 8px;
    letter-spacing: -1px;
    transition: color 0.4s ease;
}

.hero-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 16px;
    transition: color 0.4s ease;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary);
    color: var(--secondary);
    padding: 14px 28px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, background-color 0.4s ease, color 0.4s ease;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    background-color: var(--bg-main);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s, background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 1px;
    transition: color 0.4s ease;
}

.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.team-modes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.mode-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.mode-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: color 0.4s ease;
}

.mode-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    transition: color 0.4s ease;
}

.software-section {
    margin-bottom: 40px;
}

.software-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.software-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, background-color 0.4s ease, border-color 0.4s ease;
}

.software-card:hover {
    box-shadow: var(--shadow-md);
}

.software-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: color 0.4s ease;
}

.software-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    transition: color 0.4s ease;
}

.servers-section {
    margin-bottom: 40px;
}

.server-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.server-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: box-shadow 0.2s, background-color 0.4s ease, border-color 0.4s ease;
}

.server-card:hover {
    box-shadow: var(--shadow-md);
}

.server-logo {
    width: 320px;
    height: 180px;
    margin: 0 auto 16px;
    position: relative;
}

.server-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.light-logo-img {
    display: block;
}

.dark-logo-img {
    display: none;
}

body.dark-mode .light-logo-img {
    display: none;
}

body.dark-mode .dark-logo-img {
    display: block;
}

.server-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: color 0.4s ease;
}

.server-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    transition: color 0.4s ease;
}

.server-tag {
    display: inline-block;
    background-color: var(--accent-red);
    color: var(--accent-red-text);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.gallery-section {
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-item {
    aspect-ratio: 16 / 10;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.02);
}

.gallery-more {
    margin-top: 16px;
}

.btn-view-more {
    display: block;
    margin: 24px auto 0;
    padding: 10px 32px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-more:hover {
    background-color: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
}

.supporters-section {
    margin-bottom: 40px;
}

.supporters-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    transition: color 0.4s ease;
}

.supporters-list {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.supporter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.4s ease;
}

.supporter-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
}

.supporter-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.4s ease;
}

.supporter-role {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: auto;
    transition: color 0.4s ease;
}

.supporter-item:last-child {
    border-bottom: none;
}

.recruit-section {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
    padding: 32px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.recruit-text {
    font-size: 16px;
    color: var(--text-secondary);
    transition: color 0.4s ease;
}

.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    transition: color 0.4s ease, border-color 0.4s ease;
}

.theme-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-overlay .overlay-circle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    visibility: hidden;
}

.theme-overlay.to-dark .overlay-circle,
.theme-overlay.to-light .overlay-circle {
    visibility: visible;
}

.theme-overlay.to-dark .overlay-circle {
    background-color: #111111;
    animation: expandDark 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.theme-overlay.to-light .overlay-circle {
    background-color: #ffffff;
    animation: expandLight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes expandDark {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes expandLight {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.theme-animation {
    position: relative;
    z-index: 10000;
    width: 80px;
    height: 80px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: hidden;
    pointer-events: none;
}

.theme-animation.active {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.theme-animation .theme-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.theme-animation .sun-icon {
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.5);
}

.theme-animation .moon-icon {
    color: #ffffff;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.theme-animation.to-dark .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.theme-animation.to-dark .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
}

.theme-animation.to-light .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.5);
}

.theme-animation.to-light .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

@media (max-width: 1024px) {
    .team-modes,
    .software-cards,
    .server-cards {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        flex-direction: row;
        padding: 0;
        z-index: 1000;
        border-right: none;
        border-top: 1px solid var(--border-color);
        background-color: var(--bg-main);
    }
    
    .brand {
        display: none;
    }
    
    .nav-menu {
        flex-direction: row;
        width: 100%;
        height: 100%;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
    }
    
    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        font-size: 10px;
        flex: 1;
        justify-content: center;
    }
    
    .nav-item span {
        display: block;
    }
    
    .nav-icon {
        width: 20px;
        height: 20px;
    }
    
    .sidebar-footer {
        width: auto;
        padding: 0 10px;
        border-top: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-footer .nav-item,
    .sidebar-footer .nav-item:hover {
        width: 40px;
        height: 40px;
        padding: 0;
        margin: 0;
        justify-content: center;
        border-radius: 0;
        background-color: transparent;
    }
    
    .main-content {
        margin-left: 0;
        padding-bottom: 80px;
        width: 100%;
    }
    
    .hero-section {
        min-height: 400px;
        padding: 40px 20px;
        margin-bottom: 40px;
    }
    
    .hero-logo {
        width: 80%;
        height: auto;
    }
    
    .hero-title {
        font-size: 28px;
        margin: -20px 0 10px;
    }
    
    .hero-description {
        font-size: 14px;
        br { display: none; }
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .software-section,
    .servers-section,
    .gallery-section,
    .supporters-section,
    .recruit-section,
    .footer,
    .team-modes-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}