* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #FF6B6B;
    --accent-color: #FFD700;
    --dark-color: #1a1a2e;
    --light-color: #f0f0f0;
    --text-color: #333;
    --bg-color: #fff;
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

body.dark-mode {
    --bg-color: #1a1a2e;
    --text-color: #e0e0e0;
    --primary-color: #5a9ff8;
    --secondary-color: #ff8a8a;
    --light-color: #2a2a3e;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2E5C8A 100%);
    color: white;
    padding: 0.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo:hover {
    opacity: 0.9;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: white;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 遮罩層 */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-banner {
    width: 100%;
    position: relative;
}

.hero-overlay {
    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;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.avatar-container {
    margin-bottom: 2rem;
}

.robot-avatar {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #E85A5A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
}

section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.features {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
}

.servers {
    background: white;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.server-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.server-card:hover::before {
    opacity: 1;
}

.server-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(74, 144, 226, 0.4);
}

.server-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.server-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.server-card p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.server-link {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.server-link:hover {
    background: white;
    transform: scale(1.05);
}

.invite {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #E85A5A 100%);
    color: white;
}

.invite-content {
    text-align: center;
}

.invite h2 {
    color: white;
}

.invite-box {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#inviteLink {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background: white;
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: monospace;
}

.copy-btn {
    padding: 10px 20px;
    background: white;
    color: var(--secondary-color);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--accent-color);
    color: var(--text-color);
}

.invite-note {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 1rem 0;
}

/* 支援部分 */
.support {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.support-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 2rem auto 0;
    flex-wrap: wrap;
}

.support-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.support-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.support-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.support-card p {
    color: #666;
}

.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 1rem;
    text-align: center;
    color: #999;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 12px;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        flex-direction: column;
        background: linear-gradient(180deg, var(--primary-color) 0%, #1a3a5c 100%);
        text-align: left;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
        padding: 80px 0 2rem;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        transition: all 0.3s ease;
    }

    .nav-menu .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 2.5rem;
    }

    .support-grid {
        flex-direction: column;
        align-items: center;
    }

    .support-card {
        width: 100%;
        max-width: 350px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .robot-avatar {
        width: 150px;
        height: 150px;
        border-radius: 50%;
        object-fit: cover;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stats {
        gap: 1.5rem;
    }

    .features-grid,
    .servers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .invite-box {
        flex-direction: column;
    }

    #inviteLink {
        font-size: 0.8rem;
    }

    section {
        padding: 2rem 0;
    }

    section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .description {
        font-size: 0.95rem;
    }

    .robot-avatar {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .stats {
        gap: 1rem;
    }

    .feature-icon,
    .server-icon {
        font-size: 2rem;
    }

    .features-grid,
    .servers-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.6s ease-out;
}

.btn:active {
    transform: scale(0.98);
}

body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .feature-card,
body.dark-mode .server-card,
body.dark-mode .support-card {
    background: #2a2a3e;
    color: #e0e0e0;
}

body.dark-mode .features {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a3e 100%);
}

body.dark-mode .servers {
    background: #1a1a2e;
}

body.dark-mode .support {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a3e 100%);
}

body.dark-mode section h2 {
    color: #e0e0e0;
}

body.dark-mode .section-subtitle {
    color: #b0b0b0;
}

body.dark-mode .feature-card h3,
body.dark-mode .support-card h3 {
    color: #5a9ff8;
}

body.dark-mode .feature-card p,
body.dark-mode .server-card p,
body.dark-mode .support-card p {
    color: #b0b0b0;
}

body.dark-mode .invite {
    background: linear-gradient(135deg, #c73242 0%, #a02535 100%);
}

body.dark-mode #inviteLink {
    background: white;
    color: #333;
}

body.dark-mode .footer {
    background: #0f0f1e;
}

body.dark-mode .footer-section a {
    color: #a0a0a0;
}

body.dark-mode .footer-section a:hover {
    color: var(--accent-color);
}

body.dark-mode .footer-bottom {
    border-top: 1px solid #3a3a4e;
    color: #707080;
}

body.dark-mode #terms {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a2a3e 100%) !important;
}

body.dark-mode #terms > .container > div,
body.dark-mode #privacy > .container > div {
    background: #2a2a3e !important;
    color: #e0e0e0;
}

body.dark-mode #privacy {
    background: #1a1a2e !important;
}

body.dark-mode #terms h2,
body.dark-mode #privacy h2,
body.dark-mode #terms h3,
body.dark-mode #privacy h3 {
    color: #5a9ff8 !important;
}

body.dark-mode #terms p,
body.dark-mode #privacy p,
body.dark-mode #terms li,
body.dark-mode #privacy li {
    color: #b0b0b0;
}

body.dark-mode #privacy a {
    color: #5a9ff8;
}
