:root {
    --bg: #0f1724;
    /* dark navy */
    --panel: #0b2238;
    --accent: #ff8c00;
    /* orange */
    --blue: #1e90ff;
    --text: #e6eef6;
    --muted: #9fb4c8;
    --success: #28a745;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: Segoe UI, Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg), #07101a);
    color: var(--text)
}

.container {
    max-width: 1100px;
    margin: 28px auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 6px 24px rgba(2, 6, 23, 0.6);
    border-radius: 8px;
    overflow: hidden
}

header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(90deg, var(--panel), #06202f);
    position: relative; 
}

.site-banner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    z-index: 0;
}

header > div {
    position: relative;
}

.site-logo,
.header-center {
    position: relative;
    z-index: 2;
}

/* Language selector styling */
#langSelect {
    background: rgba(0,0,0,0.35);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 6px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* Small wrapper to provide a custom caret using a pseudo-element on the parent */
div[style*="margin-left:8px"] { position: relative; }
div[style*="margin-left:8px"]::after {
    content: '\25BE';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    z-index: 3;
}

.site-logo {
    height: 48px;
    width: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    padding: 4px;
    flex: 0 0 auto
}

.header-center {
    flex: 1 1 360px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 2px
}

.subtitle {
    color: whitesmoke;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.logo,
.subtitle {
    text-shadow:
        1px 1px 0 rgba(0,0,0,0.9),
        -1px 1px 0 rgba(0,0,0,0.9),
        1px -1px 0 rgba(0,0,0,0.9),
        -1px -1px 0 rgba(0,0,0,0.9);
    -webkit-text-stroke: 0.1px rgba(0,0,0,0.95);
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 18px
}

.panel {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.02)
}

textarea {
    width: 94%;
    height: 400px;
    background: #041222;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.03);
    resize: vertical;
    padding: 12px;
    font-family: Consolas, monospace;
    font-size: 13px;
    border-radius: 4px
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px
}

button {
    background: var(--blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600
}

button.secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text)
}

.status {
    font-size: 13px;
    color: var(--muted)
}

.progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px
}

canvas {
    border-radius: 4px;
    background: #00121a
}

.footer {
    padding: 12px 18px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.01));
    display: flex;
    justify-content: space-between;
    align-items: center
}

.note {
    color: var(--muted);
    font-size: 13px
}

@media (max-width:900px) {
    main {
        grid-template-columns: 1fr;
    }
}

.footer a {
    text-decoration: none;
    color: inherit;
}
.footer a:hover,
.footer a:focus {
    text-decoration: none;
}
