/* Modern Dark Mode Theme for Întreab-o pe Lia */

:root {
    --bg-dark: #090b10;
    --card-bg: rgba(18, 22, 33, 0.85);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary-red: #e11d48;
    --primary-red-glow: rgba(225, 29, 72, 0.4);
    --accent-gold: #f59e0b;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --input-bg: #0f131d;
    --input-border: #1f2937;
    --chip-bg: rgba(31, 41, 55, 0.6);
    --chip-hover: rgba(225, 29, 72, 0.15);
    --chip-border: rgba(255, 255, 255, 0.1);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* Background Effects */
.background-glow {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-red-glow) 0%, rgba(245, 158, 11, 0.08) 40%, transparent 70%);
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: 0;
    pointer-events: none;
}

.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Header */
.app-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(225, 29, 72, 0.1);
    border: 1px solid rgba(225, 29, 72, 0.3);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fda4af;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-red);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.main-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-gold) 50%, var(--primary-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 620px;
    line-height: 1.5;
}

/* Card Main */
.card-main {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Ask Form */
.ask-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-wrapper {
    position: relative;
}

textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
    outline: none;
}

textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}

textarea::placeholder {
    color: #4b5563;
}

.input-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.char-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Suggestions */
.suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggestions-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-btn {
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.chip-btn:hover {
    background: var(--chip-hover);
    border-color: var(--primary-red);
    transform: translateY(-2px);
}

/* Action Bar & Primary Button */
.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--primary-red-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 29, 72, 0.6);
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.loading-state {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(15, 19, 29, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    animation: fadeIn 0.4s ease-out;
}

.spinner-glow {
    width: 36px;
    height: 36px;
    border: 4px solid rgba(245, 158, 11, 0.2);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loading-message {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.progress-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--primary-red));
    animation: indeterminate 1.8s infinite ease-in-out;
    transform-origin: 0% 50%;
}

@keyframes indeterminate {
    0% { transform: translateX(-100%) scaleX(0.2); }
    50% { transform: translateX(0%) scaleX(0.5); }
    100% { transform: translateX(100%) scaleX(0.2); }
}

/* Error State */
.error-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #fca5a5;
}

/* Response Container */
.response-container {
    background: rgba(15, 19, 29, 0.95);
    border: 1px solid rgba(225, 29, 72, 0.3);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.response-header {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}

.lia-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-gold), var(--primary-red));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
    box-shadow: 0 0 12px var(--primary-red-glow);
}

.lia-meta {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.lia-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
}

.lia-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.response-text {
    font-size: 1.08rem;
    line-height: 1.75;
    color: #e5e7eb;
    white-space: pre-wrap;
}

.response-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}

.stamp-approved {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px dashed rgba(245, 158, 11, 0.4);
}

/* Footer */
.app-footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 20px;
}

.disclaimer {
    font-style: italic;
    color: #9ca3af;
}

.copyright {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Helpers */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }
    
    .main-title {
        font-size: 2.3rem;
    }

    .card-main {
        padding: 20px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}
