/* ============================================================================
   GYATECH VISION PRO - LAW EDITION
   Desain Modern & Profesional untuk Mahasiswa & Praktisi Hukum
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --law-gold: #D4AF37;
    --law-navy: #1B2838;
    --law-burgundy: #800020;
    --law-cream: #FFF8E7;
    --law-gray: #4A5568;
    --law-border: #CBD5E0;
    --law-accent: #2C5282;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0F2027 0%, #203A43 50%, #2C5364 100%);
    background-attachment: fixed;
    color: #E2E8F0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ========== SIDEBAR STYLING ========== */
#sidebar {
    background: linear-gradient(180deg, var(--law-navy) 0%, #0F1419 100%);
    border-right: 2px solid var(--law-gold);
    box-shadow: 4px 0 20px rgba(212, 175, 55, 0.15);
}

#sidebar h1 {
    font-family: 'Crimson Pro', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--law-gold);
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sidebar-section {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 1.5rem 0;
}

.sidebar-section h3 {
    font-family: 'Crimson Pro', serif;
    color: var(--law-gold);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

/* Mode Buttons - Legal Style */
.mode-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1.5px solid var(--law-gold);
    color: var(--law-gold);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Crimson Pro', serif;
}

.mode-btn:hover {
    background: var(--law-gold);
    color: var(--law-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.mode-btn.active {
    background: var(--law-gold);
    color: var(--law-navy);
    font-weight: 700;
}

/* Chat History Items */
.chat-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid transparent;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.chat-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-left-color: var(--law-gold);
    transform: translateX(5px);
}

.chat-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), transparent);
    border-left-color: var(--law-gold);
}

/* ========== MAIN CHAT AREA ========== */
#chatBox {
    background: transparent;
    padding: 2rem;
}

/* Upload Zone - Professional Look */
#uploadZone {
    background: linear-gradient(135deg, rgba(27, 40, 56, 0.9), rgba(15, 20, 25, 0.9));
    border: 2px dashed var(--law-gold);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

#uploadZone:hover {
    border-color: var(--law-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(27, 40, 56, 0.95));
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
}

#uploadZone h2 {
    font-family: 'Crimson Pro', serif;
    color: var(--law-gold);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#uploadZone p {
    color: #CBD5E0;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Chat Bubbles - Legal Document Style */
.user-bubble {
    background: linear-gradient(135deg, var(--law-accent), #2B6CB0);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    border-bottom-right-radius: 4px;
    max-width: 75%;
    margin-left: auto;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
    font-size: 1rem;
    line-height: 1.6;
}

.bot-bubble {
    background: linear-gradient(135deg, rgba(255, 248, 231, 0.95), rgba(255, 253, 247, 0.9));
    color: var(--law-navy);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    border-left: 4px solid var(--law-gold);
    max-width: 85%;
    margin-right: auto;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    line-height: 1.8;
    font-family: 'Crimson Pro', serif;
}

.dark .bot-bubble {
    background: linear-gradient(135deg, rgba(27, 40, 56, 0.95), rgba(15, 20, 25, 0.9));
    color: #E2E8F0;
    border-left-color: var(--law-gold);
}

/* Action Buttons - Elegant Icons */
.action-buttons {
    display: flex;
    gap: 6px;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bot-bubble:hover .action-buttons {
    opacity: 1;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--law-gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--law-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.action-btn:hover {
    background: var(--law-gold);
    color: var(--law-navy);
    transform: scale(1.1);
}

/* Input Area - Professional */
#userInput {
    background: rgba(27, 40, 56, 0.9);
    border: 2px solid var(--law-gold);
    color: #E2E8F0;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#userInput:focus {
    outline: none;
    border-color: var(--law-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background: rgba(27, 40, 56, 1);
}

#sendBtn {
    background: linear-gradient(135deg, var(--law-gold), #C9A659);
    color: var(--law-navy);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Crimson Pro', serif;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

#sendBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

#sendBtn:active {
    transform: translateY(0);
}

/* File Preview Cards */
.file-preview-item {
    background: rgba(27, 40, 56, 0.8);
    border: 1px solid var(--law-gold);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.file-preview-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.2);
}

.file-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.file-pdf { background: linear-gradient(135deg, #B91C1C, #DC2626); color: white; }
.file-doc { background: linear-gradient(135deg, #1E40AF, #2563EB); color: white; }
.file-xls { background: linear-gradient(135deg, #15803D, #16A34A); color: white; }
.file-ppt { background: linear-gradient(135deg, #C2410C, #EA580C); color: white; }
.file-txt { background: linear-gradient(135deg, #4B5563, #6B7280); color: white; }

/* Scrollbar - Elegant */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--law-gold), #C9A659);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--law-gold);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble {
    animation: fadeInUp 0.4s ease-out;
}

/* Modal Styling */
.modal {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: linear-gradient(135deg, var(--law-navy), #0F1419);
    border: 2px solid var(--law-gold);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
}

.modal-content h3 {
    font-family: 'Crimson Pro', serif;
    color: var(--law-gold);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
button {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Header Title */
#currentChatTitle {
    font-family: 'Crimson Pro', serif;
    color: var(--law-gold);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    #uploadZone h2 {
        font-size: 1.5rem;
    }

    .user-bubble, .bot-bubble {
        max-width: 90%;
        padding: 1rem;
    }
}

/* Legal Badge */
.badge-law {
    background: linear-gradient(135deg, var(--law-gold), #C9A659);
    color: var(--law-navy);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Crimson Pro', serif;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state h3 {
    font-family: 'Crimson Pro', serif;
    color: var(--law-gold);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #CBD5E0;
    font-size: 1rem;
}