body, html {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    main {
        opacity: 1;
        animation: none;
    }
}

main {
    flex: 1;
    opacity: 0;
    animation: page-fade-in 820ms ease-out forwards;
}

.page-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

h1, h2 {
    text-align: center;
    margin-bottom: 2rem;
}

form {
    margin: 0 auto;
    display: block;
}

section {
    margin: 0 auto;
}

article {
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: box-shadow 0.3s, transform 0.2s;
    font-weight: 500;
}

.btn:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.card h3 {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card p {
    color: #666;
    margin-bottom: 1rem;
}

/* Markdown content styling - prevent image overflow */
article img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

article pre {
    overflow-x: auto;
    max-width: 100%;
}

article code {
    word-wrap: break-word;
}
