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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

.notifications {
    position: relative;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.btn-primary, .btn-secondary, .btn-success, .btn-hero {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-hero {
    background: #007bff;
    color: white;
    padding: 15px 30px;
    font-size: 18px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

.zine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.zine-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.zine-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.zine-cover-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: bold;
}

.zine-info {
    padding: 15px;
}

.zine-info h3 {
    margin-bottom: 10px;
}

.zine-info h3 a {
    text-decoration: none;
    color: #333;
}

.zine-creator {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.zine-creator a {
    color: #007bff;
    text-decoration: none;
}

.zine-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 18px;
}

.flash-messages {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.flash {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 60px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.auth-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-container h2 {
    margin-bottom: 30px;
    text-align: center;
}

.profile-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #ddd;
}

.profile-info h2 {
    margin-bottom: 10px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-label {
    color: #666;
    font-size: 14px;
}
/* Full-screen mobile zine experience */
@media (max-width: 768px) {
    /* Full-screen viewer on mobile */
    body.viewing-zine {
        overflow: hidden;
    }

    .viewer-container {
        padding: 0;
        margin: 0;
        width: 100vw;
        min-height: 100vh;
    }

    .viewer-container .page-viewer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        z-index: 9999;
    }

    /* Hide navigation in viewer on mobile */
    body.viewing-zine .navbar,
    body.viewing-zine .footer,
    body.viewing-zine .viewer-header,
    body.viewing-zine .mode-toggle,
    body.viewing-zine .attribution {
        display: none;
    }

    body.viewing-zine .main-content {
        padding: 0;
        margin: 0;
    }

    /* Full-screen editor on mobile */
    .editor-container {
        height: 100vh;
        flex-direction: column;
    }

    .editor-sidebar {
        width: 100%;
        height: auto;
        order: 2;
        padding: 10px;
    }

    .editor-canvas {
        order: 1;
        height: calc(100vh - 150px);
        padding: 10px;
    }

    .page-container {
        width: calc(100vw - 20px) !important;
        height: calc(100vh - 250px) !important;
        max-width: none !important;
        max-height: none !important;
    }
}

/* Desktop: phone preview */
@media (min-width: 769px) {
    .page-viewer,
    .page-container {
        max-width: 400px;
        aspect-ratio: 9/16;
    }
}
