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

body {
    font-family: 'Special Elite', 'Courier New', monospace;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #000;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
}

.topic-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.topic-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.topic-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.topic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.topic-card:hover .topic-image img {
    transform: scale(1.05);
}

.topic-card:hover {
    border-color: #000;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.topic-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.topic-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #000;
}

.topic-card p {
    color: #666;
    font-size: 0.95rem;
}

.input-section {
    animation: fadeIn 0.5s ease;
}

.back-button {
    background: none;
    border: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: #000;
}

#selectedTopic {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.prompts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.prompt-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prompt-group label {
    font-weight: 600;
    color: #333;
}

.prompt-group input,
.prompt-group textarea {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.prompt-group input:focus,
.prompt-group textarea:focus {
    outline: none;
    border-color: #000;
}

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

.generate-button {
    width: 100%;
    padding: 1.2rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-button:hover {
    background: #333;
    transform: translateY(-2px);
}

.pdf-button {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdf-button:hover {
    background: #333;
    transform: translateY(-2px);
}

.output-section {
    animation: fadeIn 0.5s ease;
}

.monologue-container {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 3rem;
}

.monologue-container h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.monologue-text {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    line-height: 1.8;
    white-space: pre-wrap;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-button {
    padding: 0.8rem 1.5rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button:hover {
    background: #333;
    transform: translateY(-2px);
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading p {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #666;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .topic-selector {
        grid-template-columns: 1fr;
    }

    .monologue-container {
        padding: 2rem 1.5rem;
    }

    .actions {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
    }
}

.monologue-example-section {
    margin-top: 5rem;
    margin-bottom: 3rem;
}

.example-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #000;
}

.notebook-page {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(to bottom, 
        transparent 0px, 
        transparent 31px, 
        #e8e8e8 31px, 
        #e8e8e8 32px
    );
    background-size: 100% 32px;
    background-color: #fffef7;
    padding: 3rem 3rem 3rem 5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    border-left: 3px solid #ff6b6b;
}

.notebook-holes {
    position: absolute;
    left: 1.5rem;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 3rem 0;
}

.hole {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.notebook-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #000;
    text-decoration: underline;
}

.notebook-content p {
    font-size: 1rem;
    line-height: 32px;
    margin-bottom: 1rem;
    color: #1a1a1a;
    text-align: justify;
}

@media (max-width: 768px) {
    .notebook-page {
        padding: 2rem 2rem 2rem 3.5rem;
    }
    
    .notebook-holes {
        left: 1rem;
    }
    
    .hole {
        width: 10px;
        height: 10px;
    }
    
    .notebook-content h3 {
        font-size: 1.2rem;
    }
    
    .notebook-content p {
        font-size: 0.95rem;
    }
}