.ai-page { padding: 40px 20px 80px; max-width: 1100px; margin: 0 auto; }
.ai-header { text-align: center; margin-bottom: 50px; }
.ai-header h1 { font-size: 2.2rem; font-weight: 700; color: #16477f; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.ai-header p { color: #64748b; font-size: 1.1rem; max-width: 600px; margin: 0 auto; line-height: 1.5; }

.mode-tabs { display: flex; gap: 10px; margin-bottom: 30px; background: #f1f5f9; padding: 5px; border-radius: 16px; width: fit-content; margin: 0 auto 30px; }
.mode-tab { padding: 12px 24px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; color: #64748b; display: flex; align-items: center; gap: 8px; }
.mode-tab.active { background: #fff; color: #f97316; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }

.input-section { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; margin-bottom: 40px; display: none; }
.input-section.active { display: block; animation: fadeIn 0.4s; }

.ai-search-box { position: relative; margin-bottom: 20px; }
.ai-search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; z-index: 2; }
.ai-search-input { width: 100%; box-sizing: border-box; margin: 0; padding: 15px 15px 15px 45px; font-size: 1.05rem; border: 2px solid #e2e8f0; border-radius: 12px; outline: none; transition: border-color 0.2s; position: relative; z-index: 1; }
.ai-search-input:focus { border-color: #f97316; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; margin-top: 5px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); max-height: 300px; overflow-y: auto; z-index: 10; display: none; }
.search-item { display: flex; gap: 15px; padding: 15px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.2s; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: #fff7ed; }
.search-item img { width: 50px; height: 75px; object-fit: cover; border-radius: 4px; }
.search-item-info h4 { margin: 0 0 5px; font-size: 0.95rem; color: #1e293b; }
.search-item-info p { margin: 0; font-size: 0.8rem; color: #64748b; }

.selected-book-card { display: flex; gap: 20px; padding: 20px; background: #fff7ed; border: 1px solid #fed7aa; margin-bottom: 20px; display: none; }
.selected-book-card img { width: 80px; height: 120px; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.btn-ai { padding: 14px 30px; border-radius: 12px; font-weight: 700; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s; font-size: 1rem; color: white; background: linear-gradient(135deg, #f97316, #ea580c); width: 100%; max-width: 300px; margin: 0 auto; }
.btn-ai:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(249,115,22,0.3); }

/* Result State */
#usaha-result-container { display: none; }
.intro-box { background: #fff7ed; border-left: 4px solid #f97316; padding: 20px; border-radius: 0 12px 12px 0; margin-bottom: 30px; font-size: 1.05rem; color: #9a3412; line-height: 1.6; }

.ideas-grid { display: grid; gap: 30px; margin-bottom: 40px; }
.idea-card { background: #fff; border-radius: 20px; border: 1px solid #e2e8f0; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.03); }
.idea-header { background: linear-gradient(135deg, #fff7ed, #ffedd5); padding: 25px; border-bottom: 1px solid #fed7aa; }
.idea-title { font-size: 1.4rem; font-weight: 800; color: #9a3412; margin: 0 0 10px; }
.idea-desc { color: #c2410c; margin: 0; font-size: 1rem; line-height: 1.5; }
.idea-body { padding: 25px; }

.idea-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 25px; }
.meta-box { background: #f8fafc; padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0; }
.meta-box span { display: block; font-size: 0.8rem; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.meta-box strong { display: block; font-size: 1.05rem; color: #1e293b; }

.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
@media (max-width: 600px) { .swot-grid { grid-template-columns: 1fr; } }
.swot-box { padding: 15px; border-radius: 12px; }
.swot-box h5 { margin: 0 0 10px; font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.swot-box ul { margin: 0; padding-left: 20px; font-size: 0.9rem; color: #475569; }
.swot-s { background: #f0fdf4; border: 1px solid #bbf7d0; } .swot-s h5 { color: #166534; }
.swot-w { background: #fef2f2; border: 1px solid #fecaca; } .swot-w h5 { color: #991b1b; }
.swot-o { background: #eff6ff; border: 1px solid #bfdbfe; } .swot-o h5 { color: #1e40af; }
.swot-t { background: #fffbeb; border: 1px solid #fde68a; } .swot-t h5 { color: #92400e; }

.steps-list { margin: 0; padding-left: 20px; color: #334155; line-height: 1.6; }
.steps-list li { margin-bottom: 8px; }

.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.9); z-index: 1000; display: none; flex-direction: column; align-items: center; justify-content: center; }
.spinner { width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid #f97316; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .ai-page { padding: 20px 10px 40px; }
    .ai-header h1 { font-size: 1.6rem; }
    .ai-header p { font-size: 0.95rem; }
    .input-section { padding: 25px 20px; }
    .input-section h3 { font-size: 1.15rem; }
    .ai-search-input { font-size: 0.95rem; padding: 12px 15px 12px 40px; }
    .btn-ai { font-size: 0.95rem; padding: 12px 20px; }
    .intro-box { padding: 15px; font-size: 0.95rem; }
    .idea-header { padding: 20px; }
    .idea-title { font-size: 1.2rem; }
    .idea-desc { font-size: 0.95rem; }
    .idea-body { padding: 20px; }
    .swot-grid { grid-template-columns: 1fr; }
}

@media print {
    body { background: #fff !important; }
    .no-print, header, footer, .main-header, .main-footer, .mobile-bottom-nav { display: none !important; }
    .ai-page { padding: 0; max-width: 100%; margin: 0; }
    .idea-card { page-break-inside: avoid; border: 1px solid #ccc; box-shadow: none; margin-bottom: 20px; }
    .idea-header { background: #fff; padding: 15px; border-bottom: 1px solid #ccc; }
    .swot-grid { grid-template-columns: 1fr 1fr; }
    .swot-box { border: 1px solid #ccc !important; background: #fff !important; }
}
