:root {
    --background-color: #1a1a1a;
    --surface-color: #2a2a2a;
    --primary-color: #4a90e2;
    --primary-glow: rgba(74, 144, 226, 0.4);
    --text-color: #e0e0e0;
    --text-secondary-color: #a0a0a0;
    --border-color: #404040;
    --font-family: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23222" fill-opacity="0.4"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    color: var(--text-color);
    margin: 0;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

header {
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-glow);
}

header p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary-color);
    font-size: 1.1rem;
}

.translator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.panel {
    background-color: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary-color);
}

textarea, .output-box {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 1.25rem;
    font-size: 1.1rem;
    line-height: 1.6;
    flex-grow: 1;
    resize: none;
    width: 100%;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
}

.output-box {
    min-height: 200px;
    white-space: pre-wrap;
}

select#language-select, .icon-button {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

select#language-select:hover, .icon-button:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

select#language-select:focus, .icon-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glow);
    border-color: var(--primary-color);
}

.icon-button {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button svg {
    stroke: var(--text-secondary-color);
    transition: stroke 0.2s;
}

.icon-button:hover svg, .icon-button:focus svg {
    stroke: var(--primary-color);
}

.icon-button.recording svg {
    stroke: #e24a4a;
    animation: pulse 1.5s infinite;
}

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

footer {
    text-align: center;
    color: var(--text-secondary-color);
    padding: 1rem;
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 900px) {
    .translator-container {
        grid-template-columns: 1fr;
    }
}
