/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4ade80;
    --secondary-color: #60a5fa;
    --accent-color: #fbbf24;
    --error-color: #ef4444;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --combo-color: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.pixel-text {
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 2px;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.05) 0%, transparent 70%);
    animation: pulse 20s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkles::before,
.sparkles::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        100px 100px white,
        200px 150px white,
        300px 50px white,
        400px 200px white,
        500px 100px white,
        600px 150px white,
        700px 50px white,
        800px 200px white;
    animation: sparkle 10s linear infinite;
}

@keyframes sparkle {
    0% { opacity: 0; transform: translateY(0); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-100px); }
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.triforce-icon {
    color: var(--accent-color);
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-badges img {
    height: 28px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-bg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 222, 128, 0.3);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

/* Demo Section */
.demo-section {
    padding: 4rem 0;
    background: rgba(30, 41, 59, 0.5);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.sound-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
}

.sound-category {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.category-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sound-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.sound-btn {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.sound-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.sound-btn:hover::before {
    transform: translateX(0);
}

.sound-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.sound-btn.playing {
    animation: soundPulse 0.5s;
}

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

.sound-btn.success:hover {
    border-color: var(--success-color);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.sound-btn.error:hover {
    border-color: var(--error-color);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.sound-btn.achievement:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.sound-btn.combo:hover {
    border-color: var(--combo-color);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.sound-icon {
    font-size: 2rem;
}

.sound-name {
    font-weight: 600;
    color: var(--text-primary);
}

.sound-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Terminal Demo */
.terminal-demo {
    margin-top: 3rem;
}

.terminal-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.terminal {
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.terminal-header {
    background: #333;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-text {
    margin-left: auto;
    font-size: 0.875rem;
    color: #999;
}

.terminal-body {
    padding: 1rem;
    font-family: 'Monaco', 'Courier New', monospace;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 0.5rem;
    color: #0f0;
    animation: typeIn 0.5s;
}

@keyframes typeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.terminal-input {
    border-top: 1px solid #333;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-prompt {
    color: #0f0;
}

#terminal-command {
    flex: 1;
    background: transparent;
    border: none;
    color: #0f0;
    outline: none;
    font-family: inherit;
}

/* Stats Display */
.stats-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.combo-display {
    animation: comboGlow 1s ease-in-out infinite alternate;
}

@keyframes comboGlow {
    from { text-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
    to { text-shadow: 0 0 20px rgba(245, 158, 11, 0.8); }
}

/* Features Section */
.features-section {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
}

/* Installation Section */
.install-section {
    padding: 4rem 0;
    background: rgba(30, 41, 59, 0.5);
}

.install-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.install-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.install-card.recommended {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
}

.install-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--dark-bg);
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: bold;
}

.install-title {
    margin-bottom: 1rem;
}

.code-block {
    background: var(--darker-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    position: relative;
    margin-bottom: 1rem;
}

.code-block code {
    color: var(--primary-color);
    font-family: 'Monaco', 'Courier New', monospace;
    display: block;
    white-space: pre-wrap;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--border-color);
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.install-time {
    color: var(--text-secondary);
}

.install-note {
    text-align: center;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 0.5rem;
}

/* Platform Compatibility Section */
.platforms-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.05));
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.platform-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.platform-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.platform-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.platform-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.platform-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 1rem;
}

.ci-status {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.ci-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.ci-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ci-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.test-matrix {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.test-matrix h4 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.matrix-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.matrix-item {
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .install-methods {
        grid-template-columns: 1fr;
    }
    
    .stats-display {
        grid-template-columns: repeat(2, 1fr);
    }
}