:root {
  --yellow:     #F0FE72;
  --bg:         #0A0E27;
  --surface:    #1A203A;
  --border:     rgba(255, 255, 255, 0.08);
  --text-white: #FFFFFC;
  --text-muted: #BDC2C9;
  --font:       'Inter', sans-serif;
}
body {
    background-color: var(--bg);
    padding: 0;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0;
}
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    cursor: pointer;
}

.back-link a {
    text-decoration: none;
    color: inherit;
}

.back-link:hover { color: var(--yellow) }

.challenge-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.challenge-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.challenge-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}

.challenge-card {
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    color: var(--text-white);
}

.challenge-card h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}

.challenge-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 0;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.badge-easy     { background: rgba(45, 212, 191, 0.15); color: #5FACAB; }
.badge-medium   { background: rgba(240, 254, 114, 0.15); color: #F0FE72; }
.badge-hard     { background: rgba(253, 72, 167, 0.15); color: #FD48A7; }
.badge-category { background: rgba(45, 212, 191, 0.15); color: #5FACAB; }

.points-badge {
    margin-left: auto;
    color: var(--yellow);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-text {
    color: var(--text-muted);
    font-size: 14px;
}

.highlight-green {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.highlight-yellow {
    background: rgba(240, 254, 114, 0.15);
    color: var(--yellow);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.example-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}

.example-block p {
    font-family: monospace;
    font-size: 13px;
    margin: 4px 0;
}

.example-number {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.example-block .input-line       { color: var(--yellow); font-weight: 500; font-family: monospace; font-size: 13px; margin: 4px 0; }
.example-block .output-line      { color: #2dd4bf; font-weight: 500; font-family: monospace; font-size: 13px; margin: 4px 0; }
.example-block .explanation-line { color: var(--text-muted); font-weight: 500; font-family: monospace; font-size: 13px; margin: 4px 0; }

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.solution-header h2 { margin: 0; }

#lang-select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-white);
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

#code-editor {
    width: 100%;
    height: 160px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: monospace;
    font-size: 13px;
    padding: 14px;
    resize: vertical;
    outline: none;
    line-height: 1.6;
    box-sizing: border-box;
}

.start-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: var(--yellow);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.start-btn:hover { opacity: 0.9; }

.info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.info-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.info-icon.pink   { background: rgba(253, 72, 167, 0.15); color: #FD48A7; }
.info-icon.teal   { background: rgba(45, 212, 191, 0.15); color: #2dd4bf; }
.info-icon.yellow { background: rgba(240, 254, 114, 0.15); color: #F0FE72; }

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
    margin: 0 0 4px 0;
}

.info-label {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
}

.stat-green  { color: #4ade80; font-weight: 500; }
.stat-yellow { color: var(--yellow); font-weight: 500; }


@media (max-width: 768px) {
    body { padding: 0; }
    .container {
        width: calc(100% - 2rem);
        padding: 1rem 0;
    }
    .challenge-layout {
  grid-template-columns: 1fr;
}

.challenge-sidebar {
  position: static;
  width: 100%;
}
}

@media (max-width: 480px) {
    .challenge-card h2 { font-size: 14px; }
    .challenge-card p  { font-size: 13px; }
    .badge { font-size: 11px; padding: 3px 10px; }
    .start-btn { font-size: 14px; padding: 10px; }
    .stat-row  { font-size: 13px; }
    .info-value { font-size: 14px; }
    .info-label { font-size: 12px; }
}