/* Modern Preview Layout - No Book Aspect */

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
}

/* Preview Container */
.preview-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* Header */
.preview-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 50px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.preview-header .subtitle {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0.95;
}

/* Content Area */
.preview-content {
    padding: 60px 80px;
}

/* Cover Section */
.memorial-cover {
    text-align: center;
    padding: 60px 0;
    border-bottom: 3px solid #667eea;
    margin-bottom: 60px;
}

.memorial-cover h1 {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 700;
}

.memorial-cover .memorial-name {
    font-size: 2rem;
    color: #2c3e50;
    margin: 20px 0;
    font-style: italic;
}

.memorial-cover .created-for {
    font-size: 1.3rem;
    color: #7f8c8d;
    margin-top: 15px;
}

.memorial-cover .book-decoration {
    font-size: 3rem;
    color: #667eea;
    margin-top: 30px;
    opacity: 0.5;
}

/* Dedication Section */
.dedication-section {
    padding: 40px 0;
    margin-bottom: 50px;
}

.dedication-section h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.dedication-section .dedication-text {
    font-size: 1.2rem;
    line-height: 2;
    text-align: justify;
    color: #34495e;
    padding: 0 20px;
}

/* Summary Section */
.summary-section {
    padding: 40px 0;
    margin-bottom: 50px;
    background: #f8f9fa;
    margin-left: -80px;
    margin-right: -80px;
    padding-left: 80px;
    padding-right: 80px;
}

.summary-section h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.summary-section .summary-text {
    font-size: 1.1rem;
    line-height: 2;
    text-align: justify;
    color: #34495e;
    padding: 0 20px;
}

/* Chapter Section */
.chapter-section {
    padding: 50px 0;
    margin-bottom: 40px;
    page-break-inside: avoid;
}

.chapter-section h2 {
    font-size: 2.2rem;
    color: #667eea;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
}

.chapter-section .chapter-content {
    font-size: 1.1rem;
    line-height: 1.9;
    text-align: justify;
    color: #2c3e50;
}

.chapter-section .chapter-content p {
    margin-bottom: 20px;
}

/* Chapter Images */
.chapter-image {
    margin: 30px 0;
    text-align: center;
}

.chapter-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chapter-image figcaption {
    margin-top: 15px;
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Action Buttons */
.preview-actions {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .preview-container {
        box-shadow: none;
        max-width: 100%;
    }
    
    .preview-actions {
        display: none !important;
    }
    
    .preview-header {
        background: white;
        color: #2c3e50;
        page-break-after: always;
    }
    
    .chapter-section {
        page-break-inside: avoid;
    }
    
    .chapter-section h2 {
        page-break-after: avoid;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .preview-content {
        padding: 40px 50px;
    }
    
    .summary-section {
        margin-left: -50px;
        margin-right: -50px;
        padding-left: 50px;
        padding-right: 50px;
    }
}

@media (max-width: 768px) {
    .preview-header h1 {
        font-size: 2rem;
    }
    
    .preview-content {
        padding: 30px 30px;
    }
    
    .memorial-cover h1 {
        font-size: 2.2rem;
    }
    
    .memorial-cover .memorial-name {
        font-size: 1.6rem;
    }
    
    .dedication-section h2,
    .summary-section h2,
    .chapter-section h2 {
        font-size: 1.8rem;
    }
    
    .summary-section {
        margin-left: -30px;
        margin-right: -30px;
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .preview-actions {
        position: static;
        justify-content: center;
        margin: 20px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .preview-header {
        padding: 20px 20px;
    }
    
    .preview-header h1 {
        font-size: 1.6rem;
    }
    
    .preview-content {
        padding: 20px 20px;
    }
    
    .memorial-cover {
        padding: 40px 0;
    }
    
    .memorial-cover h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 100px 20px;
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #7f8c8d;
}

.empty-state h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #667eea;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}
