/* =====================================================================
   PLAY CODE ENTRY — matches Kodlama Studio / unit page aesthetic
   ===================================================================== */

:root {
    --p-primary: #6f7f99;
    --p-primary-dark: #3f4d63;
    --p-secondary: #9bb9cf;
    --p-accent: #10b981;
    --p-accent-dark: #059669;
    --p-purple: #6366f1;
    --p-text: #0f172a;
    --p-muted: #64748b;
    --p-line: #e2e8f0;
    --p-shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.08);
    --p-shadow-md: 0 24px 60px rgba(15, 23, 42, 0.14);
    --p-radius-lg: 28px;
    --p-radius-md: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--p-text);
    background:
        radial-gradient(circle at 10% 8%, rgba(99, 102, 241, 0.12), transparent 32rem),
        radial-gradient(circle at 88% 18%, rgba(16, 185, 129, 0.10), transparent 28rem),
        linear-gradient(180deg, #fbfdff 0%, #f3f7fb 50%, #f8fafc 100%);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
    pointer-events: none;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
}

.orb-one {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: rgba(99, 102, 241, 0.35);
}

.orb-two {
    width: 360px;
    height: 360px;
    bottom: -100px;
    left: -60px;
    background: rgba(16, 185, 129, 0.28);
}

.orb-three {
    width: 240px;
    height: 240px;
    top: 45%;
    left: 55%;
    background: rgba(155, 185, 207, 0.35);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
.main-header {
    position: fixed;
    z-index: 100;
    top: 18px;
    left: 24px;
    right: 24px;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 999px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(20px);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.logo {
    text-decoration: none;
    color: var(--p-text);
}

.logo-text {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.logo-main {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.logo-sub {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--p-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(111, 127, 153, 0.08);
    color: var(--p-primary-dark);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-back:hover {
    background: rgba(111, 127, 153, 0.14);
    transform: translateX(-2px);
}

/* ---------- Main layout ---------- */
.entry-main {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 120px 24px 60px;
}

.entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
    gap: 48px;
    align-items: center;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

/* ---------- Hero side ---------- */
.entry-hero {
    padding-right: 12px;
}

.entry-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: var(--p-accent-dark);
    font-size: 0.88rem;
    font-weight: 800;
}

.entry-hero h1 {
    margin-bottom: 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
    color: var(--p-text);
}

.entry-hero > p {
    max-width: 460px;
    margin-bottom: 32px;
    color: var(--p-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.entry-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.entry-feature {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--p-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--p-primary-dark);
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: var(--p-shadow-sm);
}

.entry-feature i {
    color: var(--p-purple);
    font-size: 0.9rem;
}

/* ---------- Form card ---------- */
.entry-card {
    padding: 32px 28px 28px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--p-radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--p-shadow-md);
    backdrop-filter: blur(16px);
}

.entry-error {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(214, 86, 101, 0.25);
    border-radius: var(--p-radius-md);
    background: rgba(214, 86, 101, 0.08);
    color: #b8434f;
    font-size: 0.92rem;
    font-weight: 600;
}

.entry-form {
    margin-bottom: 24px;
}

.entry-label {
    display: block;
    margin-bottom: 10px;
    color: var(--p-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.code-input-wrap {
    position: relative;
    margin-bottom: 18px;
}

.code-input-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: var(--p-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.code-input-wrap input {
    width: 100%;
    padding: 18px 18px 18px 48px;
    border: 2px solid var(--p-line);
    border-radius: var(--p-radius-md);
    background: #fff;
    color: var(--p-text);
    font-family: 'Space Grotesk', monospace;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.code-input-wrap input::placeholder {
    color: #cbd5e1;
    letter-spacing: 0.12em;
    font-size: 1.2rem;
}

.code-input-wrap input:focus {
    outline: none;
    border-color: var(--p-accent);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.entry-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 14px 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(160deg, var(--p-accent-dark), var(--p-accent));
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.entry-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(16, 185, 129, 0.36);
}

.entry-submit:active {
    transform: translateY(0);
}

/* ---------- Help section ---------- */
.entry-help {
    padding-top: 22px;
    border-top: 1px solid var(--p-line);
}

.entry-help-title {
    margin-bottom: 14px;
    color: var(--p-muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.code-examples {
    display: grid;
    gap: 10px;
}

.code-example {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--p-radius-md);
    border: 1px solid var(--p-line);
    background: var(--p-soft, #f8fafc);
}

.code-example-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1rem;
}

.code-example-course .code-example-icon {
    background: rgba(99, 102, 241, 0.12);
    color: var(--p-purple);
}

.code-example-unit .code-example-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--p-accent-dark);
}

.code-example-label {
    display: block;
    color: var(--p-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.code-example-value {
    display: block;
    margin-top: 2px;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--p-text);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .entry-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 480px;
    }

    .entry-hero {
        padding-right: 0;
        text-align: center;
    }

    .entry-hero > p {
        margin-left: auto;
        margin-right: auto;
    }

    .entry-features {
        justify-content: center;
    }
}

@media (max-width: 540px) {
    .main-header {
        top: 12px;
        left: 12px;
        right: 12px;
    }

    .entry-main {
        padding-top: 108px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .entry-card {
        padding: 24px 20px 20px;
    }

    .code-input-wrap input {
        font-size: 1.35rem;
        letter-spacing: 0.16em;
    }
}
