/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light/Meadow Mode Colors */
    --light-bg: #f5f9f5;
    --light-text: #2d3748;
    --light-accent: #ff8c42;
    --light-primary: #4a9d5f;
    --light-secondary: #6b7280;
    --light-card-bg: #ffffff;
    --light-card-border: #e5e7eb;
    
    /* Dark/Fire Mode Colors */
    --dark-bg: #0f1419;
    --dark-text: #e5e7eb;
    --dark-accent: #ff8c42;
    --dark-primary: #f97316;
    --dark-secondary: #9ca3af;
    --dark-card-bg: #1a1f2e;
    --dark-card-border: #2d3748;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== LIGHT/MEADOW THEME ===== */
body[data-theme="light"] {
    background-color: var(--light-bg);
    color: var(--light-text);
}

body[data-theme="light"] .header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid var(--light-card-border);
}

body[data-theme="light"] .card {
    background-color: var(--light-card-bg);
    border: 2px solid var(--light-card-border);
}

body[data-theme="light"] .btn-primary {
    background-color: var(--light-primary);
    color: white;
}

body[data-theme="light"] .btn-secondary {
    background-color: var(--light-card-bg);
    color: var(--light-text);
    border: 2px solid var(--light-primary);
}

body[data-theme="light"] .accent-text {
    color: var(--light-primary);
}

body[data-theme="light"] .theme-icon::before {
    content: '☀️';
}

/* ===== DARK/FIRE THEME ===== */
body[data-theme="dark"] {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

body[data-theme="dark"] .header {
    background-color: rgba(26, 31, 46, 0.95);
    border-bottom: 2px solid var(--dark-card-border);
}

body[data-theme="dark"] .card {
    background-color: var(--dark-card-bg);
    border: 2px solid var(--dark-card-border);
}

body[data-theme="dark"] .btn-primary {
    background-color: var(--dark-primary);
    color: white;
}

body[data-theme="dark"] .btn-secondary {
    background-color: var(--dark-card-bg);
    color: var(--dark-text);
    border: 2px solid var(--dark-primary);
}

body[data-theme="dark"] .accent-text {
    color: var(--dark-primary);
}

body[data-theme="dark"] .theme-icon::before {
    content: '🔥';
}

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

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.logo-accent {
    color: var(--light-accent);
}

body[data-theme="dark"] .logo-accent {
    color: var(--dark-accent);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

body[data-theme="light"] .nav a {
    color: var(--light-text);
}

body[data-theme="dark"] .nav a {
    color: var(--dark-text);
}

.nav a:hover {
    opacity: 0.7;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.title-accent {
    color: var(--light-accent);
}

body[data-theme="dark"] .title-accent {
    color: var(--dark-accent);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s, opacity 0.2s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.hero-footer {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Visitor Counter */
.visitor-counter {
    font-family: 'Courier New', monospace;
    border: 2px ridge #808080;
    padding: 10px;
    margin: 2rem auto 0;
    max-width: 250px;
    text-align: center;
    font-size: 0.9rem;
}

body[data-theme="light"] .visitor-counter {
    background: #f0f0f0;
    color: #333;
}

body[data-theme="dark"] .visitor-counter {
    background: #222;
    color: #0f0;
}

/* ===== CARDS SECTION ===== */
.content-section {
    padding: 3rem 0;
}

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

.card {
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.card-description {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.card-link {
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

body[data-theme="light"] .card-link {
    color: var(--light-primary);
}

body[data-theme="dark"] .card-link {
    color: var(--dark-primary);
}

.card-link:hover {
    opacity: 0.7;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 3rem 0;
}

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

.feature {
    text-align: center;
}

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

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.feature-description {
    opacity: 0.8;
}

/* ===== PHILOSOPHY SECTION ===== */
.philosophy-section {
    padding: 3rem 0 4rem;
}

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

.philosophy-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.philosophy-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.philosophy-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.philosophy-item p {
    opacity: 0.8;
    font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
    padding: 2rem 0;
    text-align: center;
    opacity: 0.7;
}

body[data-theme="light"] .footer {
    border-top: 2px solid var(--light-card-border);
}

body[data-theme="dark"] .footer {
    border-top: 2px solid var(--dark-card-border);
}

.footer-text {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-version {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero, .card, .feature, .philosophy-item {
    animation: fade-in 0.6s ease-out;
}
