:root {
    --primary-color: #003366;
    --secondary-color: #0F172A;
    --accent-color: #6366F1;
    --action-color: #007bff;
    --action-hover: #0056b3;
    --text-color: #333;
    --text-muted: #556677;
    --text-light: #88aacc;
    --white: #ffffff;
    --body-bg: #f4f7f9;
    --section-bg: #ffffff;
    --item-bg: #f9fbfe;
    --code-bg: #f0f4f8;
    --demo-bg: #f4f7f6;
    --border-color: #e0e6ed;
    --heading-feature: #004080;
    --link-color: #0059b3;
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem 1rem 2rem;
    text-align: center;
}

header .subtitle {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 1px;
}

header a {
    text-decoration: none;
    color: var(--white);
}

header a:hover {
    text-decoration: none;
    color: var(--white);
}

.logo-container svg {
    width: 200px;
    height: 200px;
}

header .logo-container svg {
    fill: var(--white);
}

header h1 {
    margin: -60px 0 0;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

main {
    flex: 1;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

section {
    background: var(--section-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-sm);
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 0;
}

ul {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

code, pre {
    background-color: var(--code-bg);
    color: var(--primary-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    word-break: break-word;
    overflow-wrap: break-word;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    border-left: 4px solid var(--primary-color);
    display: block;
    white-space: pre-wrap;
}

footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
}

footer a {
    color: var(--white);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.cta-links {
    margin-top: 2rem;
    text-align: center;
}

.cta-links a, .cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    margin: 0.5rem;
    font-weight: bold;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-links a:hover, .cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--shadow-md);
}

.cta-button:active {
    transform: translateY(0);
}

/* Demo Section */
.demo-hero {
    text-align: center;
    padding: 1rem 0;
}

.demo-hero h2 {
    border-bottom: none;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.demo-action {
    margin: 2rem 0 1rem;
}

.popup-welcome h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-item {
    background: var(--item-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.feature-item h3 {
    margin-top: 0;
    color: var(--heading-feature);
    font-size: 1.1rem;
}

.feature-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Examples Grid Styling */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

/* Button Grid for Examples */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 10px;
    margin: 2rem 0;
}

@media (max-width: 640px) {
    header {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    main {
        margin: 1rem auto;
        padding: 0 0.8rem;
    }

    section {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .cta-links a, .cta-button {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
        width: 100%;
    }
    
    pre {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 3rem;
        margin-top: -40px;
    }
    
    main {
        padding: 0 0.5rem;
    }

    section {
        padding: 1rem;
    }

    .logo-container img, .logo-container svg {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 360px) {
    section {
        padding: 0.8rem;
    }
    
    body {
        font-size: 0.95rem;
    }
}

.example-item {
    background: var(--item-bg);
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.example-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px var(--shadow-lg);
    border-color: var(--action-color);
}

.example-item a {
    color: var(--link-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.example-item a:hover {
    text-decoration: underline;
}

.example-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Demo Landing Page Styles */
.demo-section {
    background: var(--demo-bg);
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 8px;
    margin: 2rem 0;
}

.demo-button {
    display: inline-block;
    background: var(--action-color);
    color: var(--white);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.demo-button:hover {
    background: var(--action-hover);
}
