/* Inherit main site variables */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0f0f0f;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #10a37f;
    /* OpenAI Green to match main site */
    --accent-hover: #0d8c6e;
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Navbar Minimal Version */
.nav-minimal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.home-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-link:hover {
    opacity: 0.8;
}

.institution-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    /* Top padding for navbar */
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.institution-badge {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

/* Chat Card */
.chat-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    height: 70vh;
    /* Fixed height relative to viewport */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    backdrop-filter: blur(10px);
}

.response-area {
    flex: 1;
    margin-bottom: 2rem;
    overflow-y: auto;
    font-size: 1.5rem;
    /* Large readable text */
    line-height: 1.6;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.response-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--accent-color);
}

.feynman-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 0.75rem;
    border: 2px solid var(--accent-color);
}

.placeholder {
    color: var(--text-tertiary);
    font-style: normal;
    font-weight: 300;
}

/* Controls */
.controls-area {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}

.mic-button {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(16, 163, 127, 0.4);
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(16, 163, 127, 0.6);
}

.mic-button.listening {
    animation: pulse 1.5s infinite;
    background: #ef4444;
    /* Red for recording */
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 25px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.status-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    min-height: 1.5em;
    font-weight: 500;
}

/* Manual Input Styles */
.text-input-container {
    background: var(--bg-tertiary);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid var(--border-color);
}

#manualInput {
    background: transparent;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
}

#manualInput::placeholder {
    color: var(--text-tertiary);
}

#manualSubmit {
    background: var(--accent-color);
    transition: transform 0.2s;
}

#manualSubmit:hover {
    transform: scale(1.1);
}

/* Mobile Optimizations */
/* Revised Placeholder & Suggestions */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.placeholder-text {
    color: var(--text-tertiary);
    font-size: 1.25rem;
    font-weight: 300;
}

.suggestions-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.05);
    /* Very subtle glass */
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.suggestion-chip:hover {
    background: rgba(16, 163, 127, 0.1);
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* Thinking Animation */
.thinking-animation {
    display: flex;
    gap: 0.5rem;
    padding: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Language Badge */
.lang-badge {
    font-size: 0.75rem;
    background: #333;
    color: #aeaeae;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
    /* Push to right if in flex container */
    margin-top: 0.5rem;
    display: inline-block;
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .institution-container {
        padding: 5rem 1rem 1rem;
    }

    .chat-box {
        padding: 1.5rem;
        height: 75vh;
    }

    .response-area {
        font-size: 1.3rem;
        /* Slightly smaller than desktop but still large */
    }

    .mic-button {
        width: 80px;
        height: 80px;
        font-size: 2.2rem;
    }

    .suggestion-chip {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}