:root {
    --bg: #f7f2ea;
    --bg-soft: #efe6da;
    --card: rgba(255, 252, 247, 0.88);
    --card-strong: #fffdf9;
    --text: #211d1a;
    --muted: #7a6d63;
    --line: rgba(33, 29, 26, 0.1);
    --accent: #ff7a59;
    --accent-strong: #ff4f2f;
    --accent-soft: #ffe0d7;
    --green: #1f9d68;
    --shadow: 0 28px 70px rgba(76, 47, 29, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 122, 89, 0.14), transparent 24%),
        radial-gradient(circle at bottom right, rgba(31, 157, 104, 0.1), transparent 24%),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
    overflow-x: hidden;
}

.mesh {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.5;
}

.mesh-a {
    top: -80px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: rgba(255, 122, 89, 0.24);
}

.mesh-b {
    bottom: -100px;
    left: -70px;
    width: 320px;
    height: 320px;
    background: rgba(31, 157, 104, 0.16);
}

.app-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 36px;
}

.hero-card,
.converter-card,
.spotlight-card,
.compare-card {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    padding: 28px;
    border-radius: 32px;
    margin-bottom: 20px;
}

.tag,
.section-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 16px 0 12px;
    max-width: 620px;
    font-family: "Outfit", sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 0.98;
}

.hero-copy p {
    margin: 0;
    max-width: 640px;
    color: var(--muted);
    line-height: 1.9;
}

.hero-stats {
    display: grid;
    gap: 14px;
}

.stat-box,
.result-board,
.compare-box,
.chip-btn,
.field input,
.field select,
.swap-btn {
    border-radius: 24px;
}

.stat-box {
    background: var(--card-strong);
    border: 1px solid var(--line);
    padding: 20px;
}

.stat-box span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.stat-box strong {
    font-family: "Outfit", sans-serif;
    font-size: 1.5rem;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    margin-bottom: 20px;
}

.converter-card,
.spotlight-card,
.compare-card {
    padding: 26px;
    border-radius: 30px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 10px 0 0;
    font-size: 1.5rem;
}

.status-text {
    margin: 0;
    color: var(--muted);
}

.error-box {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 79, 47, 0.08);
    border: 1px solid rgba(255, 79, 47, 0.16);
    color: #a93924;
}

.hidden {
    display: none;
}

.converter-form {
    display: grid;
    grid-template-columns: 1.35fr 1fr auto 1fr auto;
    gap: 14px;
    align-items: end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
}

.field input,
.field select {
    width: 100%;
    min-height: 58px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.field input:focus,
.field select:focus {
    transform: translateY(-1px);
    border-color: rgba(255, 79, 47, 0.38);
}

.swap-btn {
    width: 58px;
    height: 58px;
    border: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(255, 79, 47, 0.22);
    transition: transform 0.2s ease;
}

.swap-btn:hover {
    transform: translateY(-2px) rotate(-8deg);
}

.result-board {
    margin-top: 20px;
    padding: 22px;
    background: linear-gradient(135deg, #fff8f4, #fff);
    border: 1px solid rgba(255, 122, 89, 0.15);
}

.result-label {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.result-board strong {
    display: block;
    font-family: "Outfit", sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
}

.result-sentence {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.spotlight-card {
    background: linear-gradient(180deg, #fffaf6, #fff5ee);
}

.spotlight-value {
    padding: 18px 0 10px;
}

.spotlight-value span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.spotlight-value strong {
    display: block;
    font-family: "Outfit", sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--green);
}

.spotlight-note {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.8;
}

.quick-actions {
    display: grid;
    gap: 12px;
}

.chip-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.chip-btn:hover {
    transform: translateX(-3px);
    border-color: rgba(255, 79, 47, 0.28);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.compare-box {
    min-height: 170px;
    padding: 20px;
    background: var(--card-strong);
    border: 1px solid var(--line);
}

.compare-box span {
    color: var(--muted);
}

.compare-box strong {
    display: block;
    margin: 18px 0 8px;
    font-family: "Outfit", sans-serif;
    font-size: 1.8rem;
}

.compare-box p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.skeleton {
    background:
        linear-gradient(110deg, rgba(0, 0, 0, 0.03) 8%, rgba(0, 0, 0, 0.08) 18%, rgba(0, 0, 0, 0.03) 33%),
        rgba(255, 255, 255, 0.6);
    background-size: 200% 100%;
    animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position-x: -200%;
    }
}

.convert-btn {
    min-height: 58px;
    border: 0;
    border-radius: 22px;
    padding: 14px 18px;
    background: #211d1a;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.convert-btn:hover {
    transform: translateY(-2px);
}

@media (max-width: 980px) {
    .hero-card,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .app-shell {
        width: min(100% - 16px, 1180px);
        padding-top: 14px;
    }

    .hero-card,
    .converter-card,
    .spotlight-card,
    .compare-card {
        padding: 20px;
        border-radius: 24px;
    }

    .converter-form,
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .swap-btn,
    .convert-btn {
        width: 100%;
    }

    .section-head {
        flex-direction: column;
    }
}
