:root {
    --bg1: #0f1020;
    --bg2: #1b1d36;
    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.14);
    --text: #f7f4ee;
    --muted: #d7d1e6;
    --accent: #d8b4fe;
    --accent-2: #f9c5d5;
    --input-bg: rgba(255, 255, 255, 0.92);
    --input-text: #1c1c28;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: 'Cormorant Garamond', serif;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, rgba(216, 180, 254, 0.18), transparent 30%), radial-gradient(circle at bottom right, rgba(249, 197, 213, 0.14), transparent 28%), linear-gradient(135deg, var(--bg1), var(--bg2));
}

.container {
    width: 95vw;
    max-width: 700px;
    text-align: center;
    position: relative;
    padding: 20px 0;
}

#stageContainer {
    transition: opacity 0.6s ease;
}

#stageContainer.fade-out {
    opacity: 0;
}

.stage-box {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 42px 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stage-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 5vw, 44px);
    margin: 0 0 10px;
    color: var(--text);
}

.stage-subtitle {
    font-size: clamp(20px, 2.8vw, 24px);
    color: var(--muted);
    margin: 0 0 26px;
    line-height: 1.5;
}

.urdu-box {
    margin: 0 auto 24px;
    padding: 20px 24px;
    width: fit-content;
    max-width: 100%;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-size: clamp(30px, 4.3vw, 40px);
    direction: rtl;
    text-align: center;
    line-height: 1.9;
    color: #fff7fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.translation-input {
    width: min(340px, 84vw);
    padding: 14px 16px;
    border-radius: 14px;
    border: none;
    outline: none;
    font-size: 17px;
    text-align: center;
    font-family: Arial, sans-serif;
    margin-bottom: 16px;
    background: var(--input-bg);
    color: var(--input-text);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

.translation-input::placeholder {
    color: #77758a;
}

.translation-button {
    padding: 12px 24px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #241f31;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 10px 24px rgba(216, 180, 254, 0.24);
}

.translation-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(216, 180, 254, 0.28);
    opacity: 0.98;
}

.translation-button:active {
    transform: translateY(0);
}

#message {
    margin-top: 18px;
    font-size: 21px;
    color: #f3e9ff;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-height: 30px;
}

.success-box {
    padding: 44px 30px;
}

.success-box h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 46px);
    margin: 0 0 12px;
    color: var(--text);
}

.success-box p {
    font-size: 22px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}