* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.container {
    max-width: 100vw;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

main {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 60vh;
}

#flipbook {
    margin: 0 auto;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    border-radius: 8px;
    transition: width 0.3s, height 0.3s;
}

#flipbook .page {
    background: white;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateX(40px) scale(0.98);
    transition: opacity 0.4s, transform 0.4s;
}

#flipbook .page.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

#flipbook .page.slide-left {
    transform: translateX(-40px) scale(0.98);
    opacity: 0;
}

#flipbook .page.slide-right {
    transform: translateX(40px) scale(0.98);
    opacity: 0;
}

#flipbook .page canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 4px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #ff6600;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    font-size: 1.1rem;
    color: #444;
    font-weight: 500;
    letter-spacing: 0.5px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background: linear-gradient(90deg, #ff6600 0%, #ff9900 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

button .arrow {
    font-size: 1.3em;
    vertical-align: middle;
}

button:hover {
    background: linear-gradient(90deg, #ff9900 0%, #ff6600 100%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px) scale(1.04);
}

button:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    margin: 20px 0;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    color: #333;
    min-height: 200px;
    width: 100%;
    background: transparent;
}

@media (max-width: 600px) {
    body {
        background: #f5f5f5;
    }
    .logo img {
        max-width: 90vw;
        height: auto;
        margin-bottom: 10px;
    }
    .container {
        padding: 5px;
    }
    main {
        padding: 2vw;
        min-height: 0;
    }
    #flipbook {
        width: 98vw !important;
        min-width: 0 !important;
        min-height: 0 !important;
        box-shadow: 0 0 10px rgba(0,0,0,0.08);
        border-radius: 6px;
    }
    #flipbook .page {
        min-width: 0 !important;
        min-height: 0 !important;
        width: 98vw !important;
        padding: 0;
    }
    #flipbook .page canvas {
        width: 100% !important;
        height: auto !important;
        border-radius: 4px;
    }
    .controls {
        flex-direction: row;
        gap: 10px;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    button {
        width: 45vw;
        font-size: 20px;
        padding: 14px 0;
        border-radius: 6px;
    }
    .loading {
        min-height: 100px;
        font-size: 1.1rem;
    }
} 