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

:root {
    --bg: #0f1923;
    --card: #1a2733;
    --primary: #2d9cdb;
    --primary-dark: #2180b5;
    --accent: #27ae60;
    --danger: #e74c3c;
    --warn: #f39c12;
    --text: #ecf0f1;
    --text-muted: #8b9dad;
    --border: #2c3e50;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.btn-header {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 12px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}

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

.hero { text-align: center; padding: 32px 20px; }
.hero h1 { font-size: 22px; margin-bottom: 16px; }

.stage-info { margin-bottom: 20px; }
.stage-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.stage-info h2 { font-size: 20px; margin-bottom: 4px; }
.stage-date { color: var(--text-muted); font-size: 14px; }
.no-stage { color: var(--text-muted); font-size: 16px; }

.subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; color: var(--text-muted); }
.field input, .size-input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.field input:focus, .size-input:focus { border-color: var(--primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    color: var(--text);
    background: var(--border);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text-muted); margin-top: 8px; }
.btn-lg { padding: 14px 24px; font-size: 16px; width: 100%; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-accept { background: var(--accent); color: #fff; }
.btn-reject { background: var(--danger); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }

.counter {
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.inline-form { display: inline; }

/* Alerts */
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}
.alert-error { background: rgba(231,76,60,0.15); color: #e74c3c; }
.alert-info { background: rgba(45,156,219,0.15); color: var(--primary); }

/* Stats */
.stats-row {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}
.stat {
    flex: 1;
    text-align: center;
    background: var(--bg);
    border-radius: 8px;
    padding: 12px;
}
.stat-value { display: block; font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); }

/* Upload */
.upload-area { position: relative; margin-bottom: 12px; }
.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s;
}
.upload-icon { font-size: 32px; }
.previews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.previews img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

/* Catches list */
.catches-list { display: flex; flex-direction: column; gap: 10px; }
.catch-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px;
    background: var(--bg);
    border-radius: 8px;
}
.catch-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}
.catch-info { display: flex; flex-direction: column; gap: 4px; }
.catch-date { font-size: 12px; color: var(--text-muted); }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-pending { background: rgba(243,156,18,0.2); color: var(--warn); }
.badge-accepted { background: rgba(39,174,96,0.2); color: var(--accent); }
.badge-rejected { background: rgba(231,76,60,0.2); color: var(--danger); }

/* Results */
.results-table { display: flex; flex-direction: column; gap: 6px; }
.result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg);
    border-radius: 8px;
}
.result-me { border: 1px solid var(--primary); }
.result-place { font-weight: 700; font-size: 16px; min-width: 28px; text-align: center; }
.result-name { flex: 1; font-size: 14px; }
.result-total { font-weight: 700; color: var(--primary); }
.result-detail { font-size: 12px; color: var(--text-muted); }

/* Review card */
.review-card { }
.review-img { width: 100%; max-height: 400px; object-fit: contain; border-radius: 8px; margin-bottom: 10px; }
.review-info { display: flex; flex-direction: column; gap: 4px; font-size: 14px; margin-bottom: 12px; }
.review-actions { display: flex; flex-direction: column; gap: 8px; }
.accept-form { display: flex; gap: 8px; }
.size-input { width: 80px; text-align: center; }

/* Filter bar */
.filter-bar { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* Stages list */
.stages-list { display: flex; flex-direction: column; gap: 10px; }
.stage-item {
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
}
.stage-active { border: 1px solid var(--accent); }
.stage-item-info { margin-bottom: 8px; }
.stage-item-info strong { display: block; margin-bottom: 2px; }
.stage-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.form-footer { text-align: center; margin-top: 16px; }
.form-footer a { color: var(--primary); text-decoration: none; font-size: 14px; }
