/* Premium Enhanced Glassy Design */

/* Base Typography */
* {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* White/Grey Premium Background Gradient */
.white-grey-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 25%, #f1f5f9 50%, #e2e8f0 75%, #cbd5e1 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

body {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 25%, #f1f5f9 50%, #e2e8f0 75%, #cbd5e1 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Premium Title Styling */
.premium-title {
    background: linear-gradient(135deg, #1e293b 0%, #475569 50%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

/* Premium Feature Badges */
.premium-feature-badge {
    display: inline-flex;
    items-center: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.premium-feature-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Premium Logo Container */
.premium-logo-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-logo-container:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}
/* White/Grey Premium Glass Container */
.glassy-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glassy-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.6), transparent);
}

/* White/Grey Premium Chat Container */
.premium-chat-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* White/Grey Premium Input Container */
.premium-input-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.glassy-container:hover {
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(203, 213, 225, 0.9);
}

/* Premium Message Bubbles */
.message-bubble {
    padding: 16px 20px;
    border-radius: 20px;
    margin: 12px 0;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.6;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 28px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 20px 20px 0 0;
}

.message-bubble:hover {
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.4);
}

.message-bubble.user {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(99, 102, 241, 0.25) 100%);
    color: #1e293b;
    margin-left: auto;
    text-align: right;
    border: 1px solid rgba(59, 130, 246, 0.4);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 8px 28px rgba(59, 130, 246, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.message-bubble.system {
    background: rgba(255, 255, 255, 0.25);
    color: #1e293b;
    margin-right: auto;
    text-align: right;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.message-bubble.result {
    background: rgba(255, 255, 255, 0.25);
    color: #1e293b;
    margin-right: auto;
    text-align: right;
    max-width: 85%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* White/Grey Premium Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.6);
    padding: 14px 28px;
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    box-shadow: 
        0 8px 28px rgba(59, 130, 246, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 16px 40px rgba(59, 130, 246, 0.35),
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(96, 165, 250, 0.7);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-voice {
    background: rgba(255, 255, 255, 0.9);
    color: #6b7280;
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0;
    border-radius: 50%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 28px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-voice:hover {
    background: rgba(248, 250, 252, 0.95);
    color: #374151;
    transform: scale(1.15) translateY(-2px);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    border-color: rgba(203, 213, 225, 0.9);
}

.btn-voice:active {
    transform: scale(1.1) translateY(0);
}

.btn-voice.recording {
    background: rgba(239, 68, 68, 0.6);
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.sentiment-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 8px;
}

.sentiment-positive {
    background: rgba(16, 185, 129, 0.3);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.5);
    font-weight: 700;
}

.sentiment-negative {
    background: rgba(239, 68, 68, 0.3);
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.5);
    font-weight: 700;
}

.sentiment-neutral {
    background: rgba(107, 114, 128, 0.3);
    color: #374151;
    border: 1px solid rgba(107, 114, 128, 0.5);
    font-weight: 700;
}

.loading-spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Premium Status Indicators */
.premium-status-indicator {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 28px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: statusPulse 2s ease-in-out infinite;
}

.premium-status-indicator.recording {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.2) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 
        0 8px 28px rgba(239, 68, 68, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-status-indicator.file-selected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 
        0 8px 28px rgba(16, 185, 129, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-status-indicator.processing {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 
        0 8px 28px rgba(59, 130, 246, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes statusPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.02);
        opacity: 0.9;
    }
}

/* Recording Dot Animation */
.recording-dot {
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: recordingPulse 1s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes recordingPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Processing Spinner */
.processing-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top: 2px solid #3b82f6;
    animation: processingSpinner 1s linear infinite;
}

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

/* Premium Welcome Message */
.premium-welcome-message {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.18) 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Premium Scrollbar styling */
.premium-chat-messages {
    min-height: 300px;
    max-height: 400px;
}

.premium-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.premium-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin: 8px 0;
}

.premium-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.premium-chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

#chat-messages {
    min-height: 300px;
    max-height: 400px;
}

#chat-messages::-webkit-scrollbar {
    width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin: 8px 0;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-message, .system-message {
    display: flex;
    margin: 12px 0;
}

.user-message {
    justify-content: flex-end;
}

.system-message {
    justify-content: flex-start;
}
