/**
 * AI Novel Writer - Frontend Styling
 */

/* Reset and base styles */
* {
    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%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    font-size: 2.5em;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.working-title {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 20px;
}

/* Meta info */
.meta-info {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.5s ease;
}

.day-counter {
    font-size: 1.1em;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
}

.status {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.in-progress {
    background: #fff3cd;
    color: #856404;
}

.status.completed {
    background: #d4edda;
    color: #155724;
}

.novel-meta {
    margin-top: 15px;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 5px;
    background: #e8f4f8;
    color: #2980b9;
    border-radius: 15px;
    font-size: 0.85em;
    font-family: 'Arial', sans-serif;
}

/* Export section */
.export-section {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.export-button {
    display: inline-block;
    padding: 6px 14px;
    color: #666;
    background: #f5f5f5;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-family: 'Arial', sans-serif;
    font-weight: 500;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.export-button:hover {
    background: #e8e8e8;
    border-color: #bbb;
    color: #333;
}

/* Latest paragraph section */
.latest-paragraph {
    margin-bottom: 50px;
}

.latest-paragraph h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Paragraph cards */
.paragraph-card {
    background: #fafafa;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #bdc3c7;
    transition: all 0.3s ease;
}

.paragraph-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.paragraph-card.highlight {
    background: linear-gradient(135deg, #fff5e1 0%, #fffaf0 100%);
    border-left-color: #f39c12;
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.2);
}

.paragraph-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-family: 'Arial', sans-serif;
    font-size: 0.85em;
}

.chapter-label,
.day-label {
    background: #3498db;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.date {
    color: #7f8c8d;
    font-style: italic;
}

.paragraph-text {
    font-size: 1.1em;
    line-height: 1.9;
    text-align: justify;
    text-indent: 2em;
}

/* Chapters archive */
.chapters-archive h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 500;
    text-align: center;
}

.chapter-section {
    margin-bottom: 50px;
}

.chapter-title {
    font-size: 1.6em;
    color: #34495e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    font-weight: 500;
}

.chapter-summary {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid #ecf0f1;
}

.paragraphs-list {
    margin-top: 20px;
}

.empty-state {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 40px;
    font-size: 1.1em;
}

/* Footer */
footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    color: #7f8c8d;
    font-family: 'Arial', sans-serif;
    font-size: 0.9em;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.tech-info {
    font-size: 0.85em;
    color: #95a5a6;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    header h1 {
        font-size: 2em;
    }

    .latest-paragraph h2,
    .chapters-archive h2 {
        font-size: 1.5em;
    }

    .chapter-title {
        font-size: 1.3em;
    }

    .paragraph-text {
        font-size: 1em;
        text-align: left;
    }

    .paragraph-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.6em;
    }
}
