/* Modern Theme for mynderMail Documentation */

:root {
    /* Salmon accent colors from app */
    --primary: #FF5D60;
    --primary-dark: #C23A3D;
    --primary-light: #FF8A8C;
    --on-primary: #FFFFFF;
    
    /* Mid-tone neutral palette */
    --secondary: #8B7D8B;
    --text-primary: #2D2D2D;
    --text-secondary: #5F5F5F;
    --text-muted: #8B8B8B;
    
    /* Balanced mid-tone backgrounds */
    --bg-primary: #E8E8E8;
    --bg-secondary: #F5F5F5;
    --bg-tertiary: #FFFFFF;
    --surface: #F0F0EB;
    --surface-variant: #FAFAFA;
    
    /* Subtle borders */
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    
    /* Soft shadows for depth */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    
    /* Material 3 rounded corners */
    --radius: 28px;
    --radius-sm: 16px;
    --radius-xs: 12px;
}

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: #D8D8D0;
    min-height: 100vh;
    padding: 16px;
    letter-spacing: 0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: none;
}

/* Header */
.site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-logo h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-tagline {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.3;
}

.logo-small {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.header-badge {
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-link-header {
    display: inline-block;
    transition: transform 0.2s, opacity 0.2s;
}

.app-link-header:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.app-link-header img {
    height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.header-nav {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: flex-end;
}

.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 4px 0;
}

.header-nav a:hover {
    color: var(--primary);
    text-decoration: none;
}


/* Card layout for index page */
.index-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.index-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.index-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.index-right .app-link {
    margin: 0;
}

.logo-title-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.title-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 8px;
}

.title-group h1 {
    margin-bottom: 8px;
    margin-top: 0;
    line-height: 1.2;
}

.title-group .subtitle {
    margin-bottom: 0;
    margin-top: 0;
    line-height: 1.4;
}

.index-left .nav-list {
    margin-bottom: 24px;
}

.index-right .nav-list {
    margin-bottom: 32px;
    width: 100%;
}

.screenshot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 16px;
}

.screenshot {
    max-width: 100%;
    width: 320px;
    height: auto;
}

.attribution {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.attribution a {
    color: var(--text-secondary);
    font-weight: 400;
    text-decoration: none;
}

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

@media (max-width: 768px) {
    .index-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .index-left {
        align-items: center;
        text-align: center;
    }
}

.logo {
    display: block;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

h1 {
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 16px;
    letter-spacing: 0;
    line-height: 1.2;
}

.title-group h1 {
    text-align: left;
}

h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 400;
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 0;
    border-bottom: none;
    letter-spacing: 0;
    line-height: 1.3;
}

h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 32px;
    margin-bottom: 16px;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.title-group .subtitle {
    text-align: left;
}

.purpose-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.purpose-section h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.75rem;
    color: var(--primary);
    border: none;
    padding: 0;
}

.purpose-section p {
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

.purpose-section ul {
    margin-top: 8px;
    margin-bottom: 0;
}

.purpose-section li {
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .purpose-section {
        padding: 20px;
    }
    
    .purpose-section h2 {
        font-size: 1.5rem;
    }
}

p {
    margin-bottom: 16px;
    color: var(--text-primary);
}

ul, ol {
    margin-left: 24px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 10px;
    color: var(--text-primary);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

code {
    background: rgba(255, 93, 96, 0.1);
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    font-family: 'Roboto Mono', 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 0.875rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.back-link:hover {
    color: var(--primary-dark);
    transform: translateX(-4px);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.index-left .nav-list {
    margin-top: 0;
    margin-bottom: 24px;
    width: 100%;
}

.nav-list li {
    margin-bottom: 12px;
}

.nav-list a {
    display: block;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.nav-list a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1);
    border-radius: var(--radius-sm);
}

.nav-list a:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
    text-decoration: none;
}

.nav-list a:hover::before {
    opacity: 0.06;
}

.nav-list a h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: var(--primary);
    border: none;
    padding: 0;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.nav-list a p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

/* Google Play badge styling */
.app-link {
    display: inline-block;
    margin: 24px 0;
    transition: transform 0.2s, opacity 0.2s;
}

.app-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.app-link img {
    height: 60px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.index-left .app-link {
    margin-left: 0;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .index-left .app-link {
        margin-left: auto;
        margin-right: auto;
    }
}

.meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.meta p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.meta strong {
    color: var(--text-primary);
}

footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

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

/* Table of Contents */
.toc {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 32px 0;
    box-shadow: var(--shadow-sm);
}

.toc h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--primary);
    border: none;
    padding: 0;
}

.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}

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

.toc ul ul {
    margin-left: 16px;
    margin-top: 4px;
}

.toc ul ul a {
    font-size: 0.9em;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .container {
        padding: 16px;
        max-width: 100%;
        border-radius: var(--radius-sm);
    }
    
    .site-header {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: flex-start;
        padding-bottom: 16px;
    }
    
    .header-badge {
        justify-content: flex-start;
        order: 2;
    }
    
    .header-nav {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: flex-start;
        order: 3;
    }
    
    .header-logo {
        order: 1;
    }
    
    .header-title-group {
        gap: 0;
    }
    
    .header-tagline {
        font-size: 0.8125rem;
    }
    
    .index-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .index-left {
        align-items: flex-start;
    }
    
    .index-left .app-link {
        margin-left: 0;
        margin-right: auto;
    }
    
    .index-right {
        align-items: center;
    }
    
    .screenshot-container {
        position: static;
    }
    
    .screenshot {
        width: 250px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .logo {
        width: 72px;
        height: 72px;
    }
    
    .toc {
        padding: 16px;
    }
    
    .nav-list a {
        padding: 16px;
    }
}

