:root {
    /* Light Mode Variables */
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #d63031; /* Beautiful flat red/crimson */
    --bg-color: #f8f9fa;
    --text-color: #2d3436;
    --header-text: #2d3436;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --font-family: 'Noto Sans Devanagari', sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode Variables */
        --bg-color: #0f0c29;
        --text-color: #f5f6fa;
        --header-text: #ffffff;
        --accent-color: #fd79a8; /* Bright flat pink/coral */
        --glass-bg: rgba(255, 255, 255, 0.05);
        --glass-border: rgba(255, 255, 255, 0.1);
        --card-bg: rgba(255, 255, 255, 0.05);
    }
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

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

header {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color); /* Flat color */
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.intro-section {
    padding: 6rem 1rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.intro-text {
    font-size: 2rem;
    line-height: 1.5;
    color: var(--header-text);
    font-weight: 500;
}

@media (max-width: 768px) {
    .intro-text {
        font-size: 1.5rem;
    }
}

.cta-button {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white !important;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.4);
}

.stories-section {
    padding: 6rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    width: 100%;
    max-width: 1100px; /* Constrain slightly for better centering */
    margin: 0 auto;
    justify-content: center;
}

.story-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center flex items (children) */
    text-align: center;
}

.story-card p {
    max-width: 500px;
    margin: 0 auto 1rem;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.story-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Story Detail Page Styles */
.story-detail {
    max-width: 800px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    animation: fadeInUp 0.8s ease-out;
}

.story-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}

.story-header h1 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.story-meta {
    opacity: 0.7;
    font-size: 1rem;
}

.story-content {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-color);
    white-space: pre-wrap;
}

footer {
    padding: 4rem 0 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 4rem 0;
    }
    .hero-content {
        text-align: center;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    nav {
        display: none;
    }
    .story-detail {
        margin: 2rem 10px;
        padding: 1.5rem;
    }
    .story-header h1 {
        font-size: 2rem;
    }
    .story-content {
        font-size: 1.1rem;
    }
}
