@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #4f6df5;
    --primary-dark: #3557eb;
    --primary-soft: #eef3ff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 12px 35px rgba(37, 99, 235, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'League Spartan', sans-serif;
    color: var(--text);
    line-height: 1.5;
    background:
        radial-gradient(circle at top left, #eaf0ff 0%, transparent 35%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--primary);
}

.logo span {
    color: #111827;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-btn {
    width: auto;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Page shell */
.page-shell {
    max-width: var(--container);
    margin: 0 auto;
    padding: 32px 20px 60px;
}

/* Hero banner centered */
.hero-section {
    display: flex;
    justify-content: center;
    margin: 12px 0 34px;
}

.hero-banner {
    width: 100%;
    max-width: 860px;
    text-align: center;
    padding: 38px 24px;
    border-radius: 28px;
    background: linear-gradient(135deg, #4f6df5 0%, #667eea 45%, #7b61ff 100%);
    color: var(--white);
    box-shadow: 0 18px 45px rgba(79, 109, 245, 0.22);
    position: relative;
    overflow: hidden;
}

.hero-banner::before,
.hero-banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.hero-banner::before {
    width: 180px;
    height: 180px;
    top: -60px;
    left: -40px;
}

.hero-banner::after {
    width: 220px;
    height: 220px;
    right: -70px;
    bottom: -90px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.hero-banner h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 1;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.hero-banner p {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 500;
    opacity: 0.96;
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Main content */
.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.left-panel,
.right-panel {
    padding: 30px;
}

.card-head {
    margin-bottom: 22px;
}

.card-head h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.card-head p {
    color: var(--muted);
    font-size: 16px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #4b5563;
}

input[type="text"],
input[type="number"],
input[type="range"] {
    width: 100%;
    font-family: inherit;
}

input[type="text"],
input[type="number"] {
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 16px;
    color: var(--text);
    background: #fbfdff;
    transition: all 0.25s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #9bb0ff;
    box-shadow: 0 0 0 4px rgba(79, 109, 245, 0.12);
    background: #fff;
}

.slider-container {
    padding: 10px 0 0;
}

input[type="range"] {
    appearance: none;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #dbe7ff 0%, #b8c9ff 100%);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(79, 109, 245, 0.3);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.primary-btn,
button {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    margin-top: 8px;
    box-shadow: 0 12px 24px rgba(79, 109, 245, 0.22);
}

.primary-btn:hover,
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(79, 109, 245, 0.28);
}

/* Result panel */
.right-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px 18px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.canvas-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
    padding: 20px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px dashed #d9e2f1;
}

canvas {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    border-radius: 16px;
    background: #fff;
}

.help-text {
    margin-top: 16px;
    font-size: 15px;
    color: var(--muted);
}

/* Info section */
.info-section {
    margin-top: 28px;
    padding: 28px;
}

.info-section h3 {
    color: var(--primary-dark);
    font-size: 28px;
    margin-bottom: 10px;
}

.info-section p {
    color: #4b5563;
    font-size: 17px;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 991px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .hero-banner {
        padding: 32px 22px;
        border-radius: 24px;
    }

    .canvas-container {
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 14px 16px;
    }

    .page-shell {
        padding: 24px 16px 40px;
    }

    .logo {
        font-size: 24px;
    }

    .hero-section {
        margin-bottom: 24px;
    }

    .hero-banner {
        padding: 28px 18px;
    }

    .left-panel,
    .right-panel,
    .info-section {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .card-head h2 {
        font-size: 24px;
    }

    .info-section h3 {
        font-size: 24px;
    }

    .canvas-container {
        min-height: 280px;
        padding: 16px;
    }

    canvas {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-tag {
        font-size: 12px;
        padding: 7px 12px;
    }

    .hero-banner h1 {
        font-size: 1.9rem;
    }

    .hero-banner p {
        font-size: 0.98rem;
    }

    .lang-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .left-panel,
    .right-panel {
        padding: 18px 16px;
    }

    input[type="text"],
    input[type="number"] {
        padding: 13px 14px;
        font-size: 15px;
    }

    .primary-btn,
    button {
        font-size: 16px;
        padding: 14px 16px;
    }
}
