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

body {
    font-family: 'Georgia', serif;
    background: #fafafa;
    padding: 40px 20px;
}

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

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #666;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s;
}

.back-link:hover {
    color: #333;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    color: #333;
    letter-spacing: 2px;
}

/* Zine selection screen */
.zine-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-content: center;
}

.zine-select-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zine-select-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.15);
}

.zine-select-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.zine-select-title {
    padding: 16px 12px;
    font-size: 1.1em;
    color: #333;
    letter-spacing: 0.5px;
}

.back-to-select {
    display: block;
}

.zine-viewer {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.image-container {
    position: relative;
    flex-grow: 1;
    max-width: 600px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.zine-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s;
}

.zine-image:hover {
    opacity: 0.95;
}

.page-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
}

.nav-btn {
    background: #333;
    color: white;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1em;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.1s;
    font-weight: bold;
    white-space: nowrap;
}

.nav-btn:hover {
    background: #555;
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }

    .zine-viewer {
        gap: 10px;
    }

    .zine-select {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .zine-viewer {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }
}
