:root {
    --primary-color: #1a472a;
    --primary-light: #2d5a3d;
    --secondary-color: #4a7c59;
    --accent-color: #c17f59;
    --accent-light: #d4a574;
    --text-color: #2c3e50;
    --text-light: #5a6c7d;
    --bg-light: #f8f9f7;
    --bg-white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    --gradient-accent: linear-gradient(135deg, #c17f59 0%, #d4a574 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.logo .en {
    font-size: 0.9rem;
    opacity: 0.9;
}

nav a {
    color: var(--white);
    text-decoration: none;
    margin: 0 1rem;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

.lang-switch button {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.lang-switch button:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Main Content */
main {
    margin-top: 70px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: var(--bg-white);
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--gradient-accent);
    color: var(--bg-white);
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.btn:active {
    transform: translateY(-1px);
}

/* Sections */
.section {
    padding: 60px 0;
}

.bg-light {
    background: var(--bg-light);
}

.section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section > .container > p {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
}

/* Knowledge Grid */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 40px 30px;
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.card ul {
    list-style: none;
}

.card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.card li:last-child {
    border-bottom: none;
}

/* Quiz */
#quiz-container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.question {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.question p {
    font-weight: 500;
    margin-bottom: 15px;
}

.options label {
    display: block;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.options label:hover {
    background: #e0e0e0;
}

.options input[type="radio"] {
    margin-right: 10px;
}

/* Result */
.result-card {
    text-align: center;
    padding: 40px;
}

.result-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.constitution-type {
    background: var(--secondary-color);
    color: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.constitution-type h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Notice */
.notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

/* Contact */
.contact-info {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

footer p {
    margin: 5px 0;
    opacity: 0.9;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    nav a {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
}