/* Landing page styles - independent from webapp */
/* Color scheme matches webapp but styles are separate */

:root {
    --bg-main: #0D1117;
    --bg-surface: #161B22;
    --color-primary: #30A8F0;
    --color-secondary: #F778C8;
    --color-text-primary: #E6EDF3;
    --color-text-secondary: #8B949E;
    --color-border: #30363D;
    --glow-primary: rgba(48, 168, 240, 0.3);
    --glow-secondary: rgba(247, 120, 200, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg-main) 0%, #0a0d12 100%);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--color-secondary);
}

/* --- Page Layout --- */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header / Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    z-index: 100;
}

.nav ul {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(to bottom, rgba(13, 17, 23, 0.3) 0%, rgba(13, 17, 23, 1) 100%),
        url('/landing/static/images/hero-bg.jpg') center/cover no-repeat;
    filter: blur(2px);
    opacity: 0.5;
    z-index: 0;
}

.hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 1.5rem;
}

.hero-overlay h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px var(--glow-primary);
}

.hero-overlay p {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 20px var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px var(--glow-secondary);
    color: white;
}

.scroll-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: var(--color-text-secondary);
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-15px); }
}

/* --- Sections --- */
.section {
    padding: 5rem 0;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* --- About Section --- */
.about {
    background: var(--bg-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: linear-gradient(145deg, var(--bg-surface) 0%, rgba(22, 27, 34, 0.7) 100%);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--glow-primary);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--glow-primary);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- Blog Section --- */
.blog {
    background: var(--bg-surface);
    border-top: 1px solid var(--color-border);
}

.blog h2 a {
    color: inherit;
    text-decoration: none;
}

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

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: linear-gradient(135deg, var(--bg-main) 0%, rgba(22, 27, 34, 0.5) 100%);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.post-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--glow-primary);
}

.post-card a.post-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.post-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
    line-height: 1.4;
}

.post-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.post-card .post-date {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-top: 1rem;
    opacity: 0.7;
}

/* --- Blog List Page --- */
.blog-list {
    padding-top: 6rem;
}

.blog-list h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.post-list-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Article Page --- */
.article-header {
    padding-top: 5rem;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
}

.back-link:hover {
    transform: translateX(-5px);
}

.article-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.article-wrapper h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-primary);
    line-height: 1.3;
}

.article-wrapper h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--color-primary);
}

.article-wrapper p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-wrapper ul,
.article-wrapper ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.article-wrapper li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-wrapper code {
    background: var(--bg-main);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--color-primary);
}

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

.article-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.article-wrapper .tip-box {
    background: linear-gradient(135deg, rgba(48, 168, 240, 0.1) 0%, rgba(247, 120, 200, 0.1) 100%);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.article-wrapper hr {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: 2rem 0;
}

/* --- 404 Error Page --- */
.error-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 60px var(--glow-primary);
}

.error-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.error-content p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--bg-main);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow-primary);
}

@media (max-width: 500px) {
    .error-code {
        font-size: 5rem;
    }

    .error-content h1 {
        font-size: 1.5rem;
    }

    .error-actions {
        flex-direction: column;
    }
}

/* --- Footer --- */
.site-footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--color-border);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
}

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

.site-footer a {
    color: var(--color-primary);
    margin: 0 0.25rem;
}

.site-footer a:hover {
    color: var(--color-secondary);
}

.footer-link {
    color: var(--color-text-secondary) !important;
}

.footer-link:hover {
    color: var(--color-text-secondary) !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-overlay h1 {
        font-size: 2.5rem;
    }

    .hero-overlay p {
        font-size: 1.2rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .nav ul {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .article-wrapper {
        padding: 1.5rem 1rem;
    }

    .article-wrapper h1 {
        font-size: 1.5rem;
    }
}
