:root {
    /* Main Theme Colors - Gold (Star) */
    --primary-color: #ffd700;
    --primary-shadow: #c5a300;
    --primary-light: #fff9c4;
    
    /* Secondary/Accent Colors - Red (Energy) */
    --accent-color: #ff4b4b;
    --accent-shadow: #d32f2f;
    
    /* Tech/Support Colors */
    --secondary-color: #1cb0f6;
    --secondary-shadow: #1899d6;
    
    --text-color: #3c3c3c;
    --bg-color: #fffaf0; /* Slightly warm background */
    --card-bg: #ffffff;
    --card-border: #e5e5e5;
    --gray-bg: #f7f7f7;
    --font-family: 'Nunito', 'Noto Sans SC', sans-serif;
    --border-radius: 16px;
    --container-width: 1080px;

    /* Rarity Colors from achievementRarity.js */
    --rare-color: #00C853;
    --rare-shadow: #009624;
    --sr-color: #2962FF;
    --sr-shadow: #0039CB;
    --ssr-color: #D500F9;
    --ssr-shadow: #AA00FF;
    --ur-color: #FFAB00;
    --ur-shadow: #FF6F00;
    --leg-color: #FF4B4B;
    --leg-shadow: #D32F2F;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    /* Large blocks of Gold and Red mixed in background */
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(255, 215, 0, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(255, 75, 75, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(255, 215, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(255, 75, 75, 0.15) 0%, transparent 40%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--card-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-bottom-color: var(--primary-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-shadow);
    letter-spacing: 0.5px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-shadow) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.2);
}

.logo-img {
    height: 40px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav a {
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.8px;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.nav-cta {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.1s;
    border: none;
    outline: none;
    position: relative;
    top: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #725e00 !important; /* Dark Brown/Gold text for better contrast on Gold bg */
    text-shadow: none;
    box-shadow: 0 4px 0 var(--primary-shadow);
}

.btn-primary:active {
    top: 4px;
    box-shadow: none;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-shadow); /* Match primary theme */
    border: 2px solid var(--card-border);
    box-shadow: 0 4px 0 var(--card-border);
}

.btn-secondary:active {
    top: 4px;
    box-shadow: none;
    border-color: var(--card-border);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    /* Subtle pattern overlay */
    background-image: 
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 20% 80%, rgba(255, 75, 75, 0.05) 0%, transparent 20%);
    background-size: 100% 100%;
    background-color: transparent; /* Rely on body bg */
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 550px;
    animation: slideUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-color);
    margin-bottom: 24px;
}

/* Highlight "Shining" text with Gold */
.hero-title span {
    color: var(--primary-color);
    text-shadow: 2px 2px 0px var(--primary-shadow);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #777;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.star-container {
    position: relative;
    width: 320px;
    height: 320px;
}

.floating-star {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(255, 200, 0, 0.4));
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

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

/* Features Section - Zig Zag Layout */
.features {
    padding: 0;
    background-color: transparent;
}

.feature-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 0;
    gap: 80px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.feature-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-row:nth-child(even) {
    flex-direction: row-reverse;
}

.feature-content {
    flex: 1;
    max-width: 500px;
}

.feature-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-row:nth-child(2) .feature-content h3 { color: var(--secondary-color); }
.feature-row:nth-child(3) .feature-content h3 { color: var(--ssr-color); }
.feature-row:nth-child(4) .feature-content h3 { color: var(--ur-color); }

.feature-content p {
    font-size: 1.1rem;
    color: #777;
    line-height: 1.8;
}

.feature-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon-large {
    font-size: 8rem;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    color: var(--primary-color);
    border: 4px solid var(--card-border);
    transition: transform 0.3s ease;
}

.feature-row:nth-child(2) .feature-icon-large { color: var(--secondary-color); }
.feature-row:nth-child(3) .feature-icon-large { color: var(--ssr-color); }
.feature-row:nth-child(4) .feature-icon-large { color: var(--ur-color); }

.feature-row:hover .feature-icon-large {
    transform: scale(1.05) rotate(5deg);
}

/* Rarity System Section */
.rarity-system {
    padding: 100px 0;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent to show some bg */
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Add decorative strip */
.rarity-system::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: repeating-linear-gradient(
        45deg,
        var(--primary-color),
        var(--primary-color) 20px,
        var(--accent-color) 20px,
        var(--accent-color) 40px
    );
    opacity: 0.1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #777;
    margin-bottom: 60px;
}

.rarity-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.rarity-card {
    background: white;
    border: 2px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 30px 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rarity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.rarity-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.rarity-card:hover .rarity-icon {
    transform: scale(1.2);
}

.rarity-name {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.rarity-abbr {
    font-weight: 700;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Rarity Specific Styles */
/* 1. Rare (珍贵) */
.rarity-rare { border-bottom: 4px solid var(--rare-color); }
.rarity-rare .rarity-icon, .rarity-rare .rarity-name { color: var(--rare-color); }

/* 2. Super Rare (稀有) */
.rarity-sr { border-bottom: 4px solid var(--sr-color); }
.rarity-sr .rarity-icon, .rarity-sr .rarity-name { color: var(--sr-color); }

/* 3. Superior Super Rare (超稀有) */
.rarity-ssr { border-bottom: 4px solid var(--ssr-color); }
.rarity-ssr .rarity-icon, .rarity-ssr .rarity-name { color: var(--ssr-color); }

/* 4. Ultra Rare (极其稀有) */
.rarity-ur { border-bottom: 4px solid var(--ur-color); }
.rarity-ur .rarity-icon, .rarity-ur .rarity-name { color: var(--ur-color); }

/* 5. Legendary (传奇) */
.rarity-leg { border-bottom: 4px solid var(--leg-color); }
.rarity-leg .rarity-icon, .rarity-leg .rarity-name { color: var(--leg-color); }


/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--primary-light); /* Light Gold BG */
}

.about-card {
    display: flex;
    align-items: center;
    gap: 60px;
    background: white;
    padding: 60px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-color);
    box-shadow: 0 10px 0 var(--primary-shadow);
}

.about-logo img {
    max-width: 150px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-color);
}

.vision {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-shadow);
    margin-bottom: 20px;
    font-style: italic;
}

.about-content p {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.05rem;
}

/* Download Section */
.download-section {
    padding: 120px 0;
    background: var(--primary-color); /* Changed from Red to Gold */
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 20%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.4) 0%, transparent 20%);
    color: #725e00; /* Dark Brown text for contrast */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
    color: #5c4b00; /* Darker title */
}

.download-section p {
    font-size: 1.25rem;
    margin-bottom: 50px;
    opacity: 0.95;
    font-weight: 700;
    color: #725e00;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-download {
    background: white;
    color: var(--primary-shadow); /* Match primary theme */
    padding: 18px 36px;
    border-radius: var(--border-radius);
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.1s;
    position: relative;
    top: 0;
}

.btn-download:active {
    top: 6px;
    box-shadow: none;
}

.os-icon {
    font-size: 1.6rem;
    color: inherit;
}

/* Tooltips */
.tooltip-container {
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 0;
    position: absolute;
    z-index: 10;
    bottom: 130%; 
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(10px);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Footer */
.site-footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
}

.footer-content-simple {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1024px) {
    .rarity-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }

    .feature-row {
        flex-direction: column !important;
        text-align: center;
        padding: 60px 0;
        gap: 40px;
    }

    .feature-icon-large {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }

    .rarity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-card {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }

    .main-nav {
        display: none; 
    }
    
    .header-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rarity-grid {
        grid-template-columns: 1fr;
    }
}