:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-secondary: #94a3b8;
    --code-bg: #334155;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    align-items: center;
    /* Center vertically for index, others overwrite if needed or use flex-direction column on container */
}

/* For pages with long content, we want align-items: flex-start effectively, 
   but body { align-items: center } is good for the landing page. 
   Let's check if we need a specific class or if min-height handles it.
   Actually, sub-pages have lots of content, centering vertically might look weird if content is short, 
   but usually it's long. Let's stick to the previous body style which had min-height 100vh.
   The sub-pages had `display: flex; justify-content: center; min-height: 100vh;` but NOT `align-items: center`.
   index.html had `align-items: center`.
   I will remove `align-items: center` from body and add it to a specific class `.centered-layout` for index.html 
   OR just let index.html's container margin auto handle it? 
   No, index.html used flex centering.
   Let's keep body generic and add a specific class for the landing page centering if needed, 
   or just use margin-top for sub-pages?
   Actually, the sub-pages body style I wrote in Step 46 did NOT have align-items: center.
   Step 26 (index.html) DID have align-items: center.
   So I will NOT put align-items: center in body. I'll add a class for it.
*/

body {
    align-items: flex-start;
    /* Default for content pages */
}

body.landing-page {
    align-items: center;
}

.container {
    max-width: 800px;
    width: 90%;
    padding: 2rem;
    /* index.html had text-align: center, sub-pages didn't (except implied left) */
}

.container.center-text {
    text-align: center;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    /* index.html */
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 0;
}

/* Sub-page H1 override/adjustment */
.content-card h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

h2 {
    color: var(--text-color);
    margin-top: 2rem;
    font-size: 1.5rem;
}

.content-card h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Index specific subtitle */
p.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: #818cf8;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Grid & Cards (Index) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
    /* Force no underline for card container */
    color: inherit !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.card h2 {
    font-size: 1.25rem;
    margin: 0;
    margin-bottom: 0.5rem;
    border: none;
    /* Reset H2 border for card */
    padding-bottom: 0;
}

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

.icon {
    width: 48px;
    height: 48px;
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Content Card (Sub-pages) */
.content-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Formatting Elements */
code {
    background: var(--code-bg);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    color: #e2e8f0;
}

pre {
    background: var(--code-bg);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    color: #e2e8f0;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 1.5rem 0;
    padding-left: 20px;
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.1);
    padding: 15px;
    border-radius: 0 4px 4px 0;
}

.divider {
    border-top: 1px dashed var(--border-color);
    margin: 3rem 0;
}

ul,
ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
}

strong {
    color: var(--text-color);
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.back-btn svg {
    margin-right: 0.5rem;
}

.app-description {
    text-align: left;
    max-width: 640px;
    margin: 0 auto 3rem auto;
    background: rgba(30, 41, 59, 0.5);
    /* Semi-transparent card bg */
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.app-description h2 {
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.app-description p {
    margin-bottom: 1rem;
}

.app-description ul {
    margin-bottom: 1.5rem;
}

footer {
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}