:root {
    --primary-color: #6c63ff;
    --secondary-color: #4a90e2;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
    --accent-color: #ff6b6b;
    --success-color: #2ecc71;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity var(--transition-speed);
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(74, 144, 226, 0.1));
    padding-top: 80px;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.primary-btn:hover, .secondary-btn:hover {
    transform: translateY(-2px);
}

/* Qubit Section */
.qubit-section {
    padding: 5rem 0;
    background-color: white;
}

.qubit-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

#blochSphere {
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.qubit-controls {
    display: flex;
    gap: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-group input[type="range"] {
    width: 200px;
}

.quantum-state-display {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 1rem;
}

/* Quantum Gates Section */
.gates-section {
    padding: 5rem 0;
    background-color: var(--background-color);
}

.quantum-gates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gate {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
}

.gate:hover {
    transform: translateY(-5px);
}

.gate-symbol {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.apply-gate {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.apply-gate:hover {
    background-color: var(--secondary-color);
}

/* Algorithms Section */
.algorithms-section {
    padding: 5rem 0;
    background-color: white;
}

.algorithm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.algorithm-card {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
}

.algorithm-card:hover {
    transform: translateY(-5px);
}

.algorithm-card button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color var(--transition-speed);
}

.algorithm-card button:hover {
    background-color: var(--secondary-color);
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Animation Keyframes */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-in {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation Classes */
.fade-in {
    animation: fade-in 0.5s ease-out forwards;
}

.slide-in {
    animation: slide-in 0.5s ease-out forwards;
}

/* Algorithm Demonstration */
.algorithm-demonstration {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.algorithm-steps {
    margin-top: 1.5rem;
}

.algorithm-step {
    background-color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.algorithm-result {
    background-color: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Gate Description */
.gate-description {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .qubit-controls {
        flex-direction: column;
    }
    
    .control-group input[type="range"] {
        width: 100%;
    }
    
    .adventure-content {
        flex-direction: column;
    }
    
    .adventure-description {
        width: 100%;
    }
    
    .adventure-section h2 {
        font-size: 2rem;
    }
    
    .example-cards {
        grid-template-columns: 1fr;
    }
}

/* 量子冒险部分样式 */
.adventure-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(74, 144, 226, 0.05));
}

.adventure-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.adventure-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
}

.adventure-image {
    flex: 1;
    text-align: center;
}

.wizard-preview {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
}

.wizard-preview:hover {
    transform: scale(1.05);
}

.adventure-description {
    flex: 1;
}

.adventure-description p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.adventure-features {
    list-style-type: none;
    margin: 1.5rem 0;
}

.adventure-features li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.icon {
    font-size: 1.5rem;
    margin-right: 0.8rem;
    display: inline-block;
}

.adventure-examples {
    margin: 2rem 0;
}

.adventure-examples h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.example-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.example-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    text-align: center;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.example-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.example-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.example-card p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0;
}

.adventure-cta {
    margin-top: 2rem;
    text-align: center;
}

.adventure-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.adventure-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
} 