/* style.css for Novel Adviser */

/* --- Main App Container --- */
#novel-adviser-app {
    max-width: 900px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

/* --- Header --- */
.novel-adviser-header {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.novel-adviser-header h1 {
    font-size: 2.75rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    font-family: Georgia, serif;
}
.novel-adviser-header p {
    font-size: 1.125rem;
    color: #cbd5e1;
    margin: 0;
}

/* --- Form --- */
.novel-adviser-form-container {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}
.novel-adviser-form-container h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #111827;
    text-align: center;
}
.novel-adviser-section {
    margin-bottom: 1.5rem;
}
.novel-adviser-form-container label {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #374151;
}

/* --- Form Inputs & Buttons --- */
.novel-adviser-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.genre-button {
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
    cursor: pointer;
    background: #f9fafb;
    color: #374151;
    transition: all 0.2s ease-in-out;
}
.genre-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.genre-button.selected {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.2);
}
.novel-adviser-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .novel-adviser-grid {
        grid-template-columns: 1fr 1fr;
    }
}
input[type="text"], select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box; /* Important for consistent sizing */
}
input[type="text"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
textarea {
    resize: vertical;
    min-height: 80px;
}
#get-recommendations-btn {
    background: #4f46e5;
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
    padding: 0.9rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    width: 100%;
}
@media (min-width: 768px) {
    #get-recommendations-btn {
        width: auto;
    }
}
#get-recommendations-btn:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 7px 10px -3px rgba(0, 0, 0, 0.1);
}
#get-recommendations-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}


/* --- Results Area --- */
#results-area {
    padding-top: 1rem;
}
.novel-adviser-placeholder, .novel-adviser-error {
    text-align: center;
    padding: 2.5rem;
    background: #f9fafb;
    border-radius: 1rem;
    border: 1px dashed #d1d5db;
    color: #6b7280;
}
.novel-adviser-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}
.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

#results-area h2 {
    font-size: 1.75rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #111827;
}
.rec-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .rec-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.rec-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.rec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.07);
}
.rec-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    color: #4f46e5;
    margin: 0 0 0.25rem 0;
}
.rec-card .author {
    font-size: 1rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 1rem;
}
.rec-card p {
    color: #374151;
    line-height: 1.6;
}

/* --- Footer --- */
.novel-adviser-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    background-color: #f9fafb;
    border-top: 1px solid #e2e8f0;
    color: #6b7280;
}
.novel-adviser-footer .footer-links {
    margin-bottom: 1rem;
}
.novel-adviser-footer .footer-links a {
    color: #6b7280;
    text-decoration: none;
    margin: 0 0.75rem;
    transition: color 0.2s ease-in-out;
}
.novel-adviser-footer .footer-links a:hover {
    color: #4f46e5;
}
.novel-adviser-footer .copyright {
    font-size: 0.875rem;
}
