/* ── Upload page ───────────────────────────────────────────────────── */

.upload-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.upload-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    color: #111;
}

.upload-page .upload-subtitle {
    font-size: .9rem;
    color: #57606a;
    margin: 0 0 1.5rem;
}

.upload-page .upload-subtitle a {
    color: var(--accent);
    text-decoration: none;
}
.upload-page .upload-subtitle a:hover { text-decoration: underline; }

/* ── Drop zone ─────────────────────────────────────────────────────── */

.drop-zone {
    border: 2px dashed #c8d8d7;
    border-radius: 12px;
    background: #f0faf9;
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: #e0f2f0;
}

.drop-zone.has-file {
    border-style: solid;
    border-color: var(--accent);
    background: #e8f7f5;
}

.drop-zone-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: .6rem;
    display: block;
}

.drop-zone-primary {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 .2rem;
}

.drop-zone-secondary {
    font-size: .83rem;
    color: #57606a;
    margin: 0 0 1.25rem;
}

.drop-zone-file-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--accent-dk, #0f766e);
    margin: .5rem 0 0;
    min-height: 1.2em;
}

.drop-zone-title-row {
    display: flex;
    gap: .6rem;
    align-items: center;
    max-width: 440px;
    margin: 0 auto;
}

.drop-zone-title-row input[type="text"] {
    flex: 1;
    padding: .45rem .75rem;
    border: 1px solid #c8d8d7;
    border-radius: 6px;
    font-size: .9rem;
    background: #fff;
    color: #111;
    transition: border-color .15s, box-shadow .15s;
}
.drop-zone-title-row input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12);
}

/* Hidden file input — triggered by JS click on the drop zone */
.drop-zone input[type="file"] {
    display: none;
}

/* ── Upload actions row ────────────────────────────────────────────── */

.upload-actions-row {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.upload-actions-row .btn-primary,
.upload-actions-row .btn-outline {
    padding: .5rem 1.25rem;
    font-size: .9rem;
}

/* Progress */
.upload-progress {
    margin-top: .75rem;
}
.upload-progress progress {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    border: none;
    appearance: none;
}
.upload-progress progress::-webkit-progress-bar  { background: #e1e4e8; border-radius: 3px; }
.upload-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
.upload-progress progress::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
.upload-progress-label {
    font-size: .8rem;
    color: #57606a;
    margin-top: .3rem;
}

/* ── Anon notice ───────────────────────────────────────────────────── */

.upload-anon-notice {
    margin-top: 1rem;
    font-size: .82rem;
    color: #57606a;
}
.upload-anon-notice a { color: var(--accent); text-decoration: none; }
.upload-anon-notice a:hover { text-decoration: underline; }

/* ── Sample puzzles section ────────────────────────────────────────── */

.samples-section {
    margin-top: 3rem;
}

.samples-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 .3rem;
    color: #111;
}

.samples-section .samples-subtitle {
    font-size: .85rem;
    color: #57606a;
    margin: 0 0 1.25rem;
}

.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.sample-card {
    display: block;
    border: 1px solid #dce8e7;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    transition: box-shadow .15s, border-color .15s, transform .12s;
}

.sample-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.sample-thumb {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sample-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.sample-thumb-placeholder {
    font-size: 2rem;
    color: #c8d8d7;
}

.sample-thumb-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.sample-card-label {
    padding: .6rem .75rem .65rem;
    font-size: .85rem;
    font-weight: 600;
    color: #111;
    border-top: 1px solid #edf2f1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .4rem;
}

.sample-card-label span { flex: 1; white-space: normal; word-break: break-word; }
.sample-card-arrow { color: var(--accent); font-size: .85rem; flex-shrink: 0; }
