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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-style: italic;
}

.setup-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.setup-notice h3 {
    color: #856404;
    margin-bottom: 10px;
}

.setup-notice p {
    color: #664d03;
    margin-bottom: 15px;
}

.setup-notice code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', monospace;
}

.generator-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.haiku-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.generate-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.haiku-display {
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out;
}

.haiku-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 5px solid #3498db;
    position: relative;
}

.haiku-text {
    font-size: 1.8em;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 20px;
    white-space: pre-line;
    font-style: italic;
    font-family: 'Times New Roman', serif;
}

.haiku-meta {
    color: #7f8c8d;
    font-size: 0.9em;
    font-style: italic;
    margin-bottom: 15px;
}

.save-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

.save-btn:hover:not(:disabled) {
    background: #229954;
}

.save-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.previous-haikus {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    color: #2c3e50;
}

.secondary-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

.secondary-btn:hover:not(:disabled) {
    background: #7f8c8d;
}

.secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.haikus-list {
    display: grid;
    gap: 20px;
}

.haiku-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 3px solid #e74c3c;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.haiku-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.haiku-item .haiku-text {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #2c3e50;
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
}

.haiku-item .haiku-meta {
    font-size: 0.8em;
    color: #7f8c8d;
}

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

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

footer {
    text-align: center;
    margin-top: 40px;
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.9em;
}

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

    .generator-section,
    .previous-haikus {
        padding: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .haiku-text {
        font-size: 1.4em;
    }

    .haiku-card {
        padding: 25px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-header h2 {
        margin-bottom: 10px;
    }
}