/* DadOps - Lined Notebook Theme */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Permanent+Marker&display=swap');

:root {
    /* single source of truth for line spacing */
    --notebook-line: 36px;
    --line-offset: 15px;
}

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

body {
    font-family: 'Caveat', cursive;
    font-size: 20px;
    line-height: var(--notebook-line);
    color: #2c3e50;
    background: #fff;
    position: relative;
}

/* Lined notebook paper background */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    min-height: 100%;
    background-image:
        linear-gradient(
            transparent,
            /* blank area before the line */
            transparent calc(var(--notebook-line) - var(--line-offset)),
            /* the 1px grey line */
            #e0e0e0 calc(var(--notebook-line) - var(--line-offset)),
            #e0e0e0 calc(var(--notebook-line) - var(--line-offset) + 1px),
            /* rest of the cell stays transparent */
            transparent calc(var(--notebook-line) - var(--line-offset) + 1px),
            transparent var(--notebook-line)
        );
    background-size: 100% var(--notebook-line);
    z-index: -1;
    pointer-events: none;
}

/* Red margin line on the left */
body::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 70px;
    bottom: 0;
    min-height: 100%;
    width: 2px;
    background: #ff6b6b;
    z-index: -1;
    pointer-events: none;
}

/* Header - tightened */
header {
    padding: 20px 80px 12px 80px;
    border-bottom: 4px solid #ff6b6b;
    margin-bottom: 24px; /* was 40px */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    text-decoration: none;
    color: #2c3e50;
}

.logo h1 {
    font-family: 'Permanent Marker', cursive;
    font-size: 34px;
    color: #3498db;
    margin: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 22px; /* a bit narrower than 30 */
}

nav a {
    text-decoration: none;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
    transition: color 0.3s;
}

nav a:hover {
    color: #3498db;
}

/* Main content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 36px 80px 60px;  /* was 72px 100px */
    min-height: calc(100vh - 260px);
}

/* Headings – remove the manual top offsets */
h1, h2, h3 {
    font-family: 'Permanent Marker', cursive;
    color: #2c3e50;
    position: relative;
}

h1 {
    font-size: 48px;
    line-height: calc(var(--notebook-line) * 2);
    text-align: center;
    margin-bottom: var(--notebook-line); /* was 72px */
}

h2 {
    font-size: 30px;
    line-height: var(--notebook-line);
    margin-bottom: var(--notebook-line);
}

h3 {
    font-size: 24px;
    line-height: var(--notebook-line);
    margin-bottom: var(--notebook-line);
}

/* paragraphs – keep them on the notebook rhythm but remove extra space */
p {
    margin-bottom: 0; /* text will sit on consecutive lines now */
    font-size: 22px;
    line-height: var(--notebook-line);
}

/* links */
a {
    color: #3498db;
    text-decoration: underline;
}

a:hover {
    color: #2980b9;
}

/* Cards/Sections – this was the big gap */
.card {
    margin: var(--notebook-line) 0;           /* was 72px (2 lines) */
    padding-bottom: var(--notebook-line);     /* keep a clean separator */
    border-bottom: 2px solid #d0d0d0;
}

.card:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    background: rgba(52, 73, 94, 0.95);
    color: white;
    text-align: center;
    padding: 24px 80px;
    margin-top: 36px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    margin: 0;
    font-size: 20px;
}

/* Games layout (kept mostly as-is) */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.game-card {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #e74c3c;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.2);
}

.game-card h3 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #e74c3c;
}

.game-card p {
    font-size: 20px;
    margin-bottom: 20px;
}

.game-card a {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    transition: background 0.3s, transform 0.2s;
}

.game-card a:hover {
    background: #2980b9;
    transform: scale(1.05);
}

/* Coming Soon */
.coming-soon {
    text-align: center;
    padding: 100px 20px;
    font-size: 48px;
    color: #95a5a6;
}

/* Mobile responsive */
@media (max-width: 768px) {
    header {
        padding: 16px 70px 12px 70px;
    }

    main, footer {
        padding-left: 70px;
        padding-right: 20px;
    }

    .header-content {
        flex-direction: column;
        gap: 12px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    nav a {
        font-size: 20px;
    }

    .logo h1 {
        font-size: 28px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }
}
