:root {
    --bg-color: #121212;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-color: #d4af37; /* Champagne Gold */
    --accent-hover: #e5c158;
    --error-color: #ff6b6b;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Settings Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.settings-card {
    background: var(--card-bg);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 3rem;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-card h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

input[type="password"],
textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}

.primary-btn:hover {
    background: var(--accent-hover);
}

.primary-btn:active {
    transform: scale(0.98);
}

.secondary-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.85rem;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    opacity: 1;
}

.secondary-btn.icon-only {
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

.error-msg {
    color: var(--error-color);
    margin-top: 1rem;
    font-size: 0.85rem;
    min-height: 1.2em;
}

/* Header */
.header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.8rem;
    font-weight: 600;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.dot.active {
    background: var(--error-color);
    animation: pulse 1.5s infinite;
}

#status-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Transcript Area */
.transcript-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.transcript-container::-webkit-scrollbar {
    width: 8px;
}

.transcript-container::-webkit-scrollbar-track {
    background: transparent;
}

.transcript-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.transcript-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 2rem;
}

.welcome-message {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    font-style: italic;
    margin-top: auto;
    margin-bottom: auto;
}

.transcript-block {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.5s forwards;
}

.transcript-line {
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.transcript-line.original {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    margin-bottom: 0.2rem;
}

.transcript-line.translation {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.transcript-line.partial {
    color: var(--text-secondary);
}

.transcript-line.final {
    color: var(--text-primary);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.4rem;
    padding: 1rem 0;
}

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

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 107, 107, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
@media (max-width: 600px) {
    .header { padding: 1rem; }
    .transcript-container { padding: 1rem; }
    .settings-card { padding: 2rem; width: 95%; }
    .transcript-line.translation { font-size: 1.2rem; }
}

