:root {
    --bg-color: #f4f4f9;
    --text-color: #333;
    --accent-color: #5a67d8;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-ancient: serif; /* Fallback */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.app-header {
    text-align: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.05);
}

.app-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.app-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.input-section {
    text-align: center;
    margin-bottom: 3rem;
}

#name-input {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s;
}

#name-input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.language-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.8rem 1.2rem;
    border: none;
    background-color: #e2e8f0;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-btn:hover {
    background-color: #cbd5e0;
    transform: translateY(-2px);
}

.lang-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.result-section {
    text-align: center;
    margin-bottom: 3rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ancient-text {
    font-size: 3rem;
    font-family: var(--font-ancient);
    margin-bottom: 1rem;
    min-height: 1.2em;
}

.note {
    font-style: italic;
    opacity: 0.8;
}

.history-section {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.history-section h2 {
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 600px) {
    .ancient-text {
        font-size: 2rem;
    }
    
    .lang-btn {
        flex: 1 1 40%;
    }
}
