/* Voiceteam Interface Styles - AO3 Theme */
:root {
    --ao3-red: #900;
    --ao3-red-dark: #700;
    --ao3-red-light: #c00;
    --success: #2a8f2a;
    --warning: #c90;
    --danger: #900;
    --background: #f6f6f6;
    --surface: #ffffff;
    --surface-alt: #eee;
    --text: #2a2a2a;
    --text-muted: #666;
    --border: #ccc;
    --mod-color: #900;
    --validatorian-color: #2a8f2a;
}

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

body {
    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'GNU Unifont', Verdana, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* Status Bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    z-index: 1000;
    display: none;
}
.status-bar.success {
    background: var(--success);
    color: #fff;
}
.status-bar.error {
    background: var(--danger);
    color: #fff;
}

/* Header */
.header {
    background: var(--ao3-red);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: normal;
    color: #fff;
}

.event-selector {
    font-size: 1.25rem;
    font-weight: normal;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}

.event-selector:hover {
    border-color: rgba(255,255,255,0.5);
}

.event-selector option {
    background: var(--surface);
    color: var(--text);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.user-info img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-mod {
    background: #fff;
    color: var(--ao3-red);
}

.badge-validatorian {
    background: var(--validatorian-color);
    color: #fff;
}

.badge-masquerade {
    background: var(--warning);
    color: #000;
}

.badge-error {
    background: #dc3545;
    color: #fff;
    cursor: help;
}

.masquerade-stop {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    margin-left: 4px;
    opacity: 0.8;
}

.masquerade-stop:hover {
    opacity: 1;
}

.masquerade-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.masquerade-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
}

.masquerade-link {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.1);
    transition: all 0.2s;
}

.masquerade-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

.masquerade-link.active {
    color: var(--ao3-red);
    background: #fff;
}

.login-btn {
    background: #fff;
    color: var(--ao3-red);
    padding: 6px 14px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
}

.login-btn:hover {
    background: #f0f0f0;
}

.logout-btn {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    margin-left: 8px;
}

.logout-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.1);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    gap: 0;
    overflow-x: auto;
}

.nav-tab {
    padding: 12px 20px;
    color: var(--ao3-red);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-tab:hover {
    background: var(--surface-alt);
}

.nav-tab.active {
    border-bottom-color: var(--ao3-red);
    font-weight: bold;
}

.nav-tab .count {
    background: var(--surface-alt);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: normal;
}

/* Main Content */
.main-content {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
}

.filter-input:focus {
    outline: none;
    border-color: var(--ao3-red);
}

.view-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Submissions Grid */
.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.submissions-grid.list-view {
    grid-template-columns: 1fr;
}

.submissions-grid.list-view .submission-card {
    flex-direction: row;
}

.submissions-grid.list-view .card-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

/* Submission Card */
.submission-card {
    background: var(--surface);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.submission-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.submission-card.pending {
    border-left: 4px solid var(--warning);
}

.submission-card.validated {
    border-left: 4px solid var(--success);
}

.card-image {
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-image.no-image .placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.card-image.discord-expired {
    background: linear-gradient(135deg, #5865f2 0%, #3b44a1 100%);
    justify-content: center;
    flex-direction: column;
    color: white;
    font-size: 0.65rem;
    text-align: center;
}

.card-image.discord-expired::before {
    content: '😢';
    font-size: 2rem;
    margin-bottom: 4px;
}

.card-image.discord-expired::after {
    content: 'Discord link expired';
    opacity: 0.8;
}

.card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--ao3-red);
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.card-meta .creator {
    color: var(--text-muted);
}

.card-meta .team {
    background: var(--surface-alt);
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 0.75rem;
}

.challenges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.challenge-tag {
    background: var(--ao3-red);
    color: #fff;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 0.7rem;
}

.validatorian-details {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.validatorian-details .detail-item {
    background: var(--surface-alt);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.points {
    font-weight: bold;
    color: var(--success);
}

.ao3-link {
    text-decoration: none;
    font-size: 0.8rem;
}

.ao3-link:hover {
    text-decoration: underline;
}

.ao3-link.link-ao3 { color: var(--ao3-red); }
.ao3-link.link-discord { color: #5865F2; }
.ao3-link.link-gdrive { color: #4285F4; }
.ao3-link.link-youtube { color: #FF0000; }
.ao3-link.link-soundcloud { color: #FF5500; }
.ao3-link.link-dropbox { color: #0061FF; }
.ao3-link.link-tumblr { color: #36465D; }
.ao3-link.link-other { color: #666; }

/* Validate Button */
.validate-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.validate-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.validate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.validated-badge {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: var(--success);
    color: #fff;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0.7;
}

/* Points View */
.points-view h2 {
    margin-bottom: 20px;
    color: var(--ao3-red);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.team-card {
    background: var(--surface);
    border-radius: 3px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.team-card.rank-1 {
    border-color: gold;
    border-width: 2px;
    background: linear-gradient(135deg, #fff 0%, #fffbea 100%);
}

.team-card.rank-2 {
    border-color: silver;
    border-width: 2px;
}

.team-card.rank-3 {
    border-color: #cd7f32;
    border-width: 2px;
}

.team-rank {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-muted);
}

.team-card.rank-1 .team-rank {
    color: #b8860b;
}

.team-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 6px 0;
    color: var(--ao3-red);
}

.team-points {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--success);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Error Message */
.error-message {
    background: #fee;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 3px;
    border: 1px solid var(--danger);
    margin-bottom: 20px;
}

.masquerade-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.clear-masquerade-link {
    color: var(--danger);
    text-decoration: underline;
    white-space: nowrap;
}

.clear-masquerade-link:hover {
    color: #600;
}

/* Missed Check-Ins Banner */
.missed-checkins-banner {
    background: #fff3cd;
    color: #856404;
    padding: 12px 16px;
    border-radius: 3px;
    border: 1px solid #ffc107;
    margin-bottom: 20px;
}

.missed-checkins-banner strong {
    display: block;
    margin-bottom: 8px;
}

.missed-period {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.missed-period:last-child {
    border-bottom: none;
}

.period-name {
    font-weight: 600;
    color: #664d03;
}

.missed-count {
    font-size: 0.9em;
    color: #856404;
}

.missed-names {
    font-size: 0.85em;
    color: #6c5a10;
    flex: 1;
}

/* Footer */
.footer {
    padding: 20px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.submit-btn {
    background: var(--ao3-red);
    color: #fff;
    padding: 10px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.submit-btn:hover {
    background: var(--ao3-red-dark);
}

.cache-info {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .masquerade-menu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 8px;
    }

    .nav-tabs {
        padding: 0 12px;
    }

    .main-content {
        padding: 16px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .submissions-grid {
        grid-template-columns: 1fr;
    }
}

/* Validation Guide Banner */
.validation-guide-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--ao3-red);
    padding: 10px 16px;
    margin-bottom: 16px;
    border-radius: 3px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.validation-guide-banner a {
    color: var(--ao3-red);
    text-decoration: none;
    font-weight: 500;
}

.validation-guide-banner a:hover {
    text-decoration: underline;
}

/* Unvalidate Button */
.unvalidate-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: var(--warning);
    color: #000;
    border: none;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.unvalidate-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.unvalidate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Lazy Loading */
.lazy-bg {
    background-color: var(--surface-alt);
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s;
}

.lazy-bg:not(.loaded) {
    opacity: 0.5;
}

.lazy-bg.loaded {
    opacity: 1;
}

/* Submission Card Click State */
.submission-card {
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.1s;
}

.submission-card:active {
    transform: scale(0.98);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 3px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    padding: 1em;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-alt);
}

.modal-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    opacity: 0.3;
}

.modal-image.no-image::after {
    content: '🎧';
}

.modal-image.discord-expired {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5865f2 0%, #3b44a1 100%);
    color: white;
    font-size: 0.8rem;
    text-align: center;
    padding: 20px;
}

.modal-image.discord-expired::before {
    content: '😢';
    font-size: 3rem;
    margin-bottom: 8px;
}

.modal-image.discord-expired::after {
    content: 'Discord links are temporary';
    font-size: 0.75rem;
    opacity: 0.8;
}

.modal-body {
    padding: 20px;
}

.modal-body h2 {
    color: var(--ao3-red);
    margin-bottom: 12px;
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.modal-team {
    background: var(--surface-alt);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.modal-points {
    color: var(--success);
    font-weight: bold;
    font-size: 1.1rem;
}

.modal-challenges {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.modal-summary {
    line-height: 1.6;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.modal-summary a {
    color: var(--ao3-red);
    word-break: break-all;
}

.modal-summary a:hover {
    text-decoration: underline;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.modal-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-btn.primary,
.modal-btn.link-ao3 {
    background: var(--ao3-red);
    color: #fff;
}

.modal-btn.link-discord {
    background: #5865F2;
    color: #fff;
}

.modal-btn.link-gdrive {
    background: #4285F4;
    color: #fff;
}

.modal-btn.link-youtube {
    background: #FF0000;
    color: #fff;
}

.modal-btn.link-soundcloud {
    background: #FF5500;
    color: #fff;
}

.modal-btn.link-dropbox {
    background: #0061FF;
    color: #fff;
}

.modal-btn.link-tumblr {
    background: #36465D;
    color: #fff;
}

.modal-btn.link-other {
    background: #666;
    color: #fff;
}

.modal-btn.validate {
    background: var(--success);
    color: #fff;
}

.modal-btn.validate.is-validated {
    background: var(--warning);
    color: #000;
}

.modal-btn.edit {
    background: #6c757d;
    color: #fff;
}

.modal-btn.edit:hover {
    background: #5a6268;
}

.modal-btn.airtable {
    background: #18BFFF;
    color: #fff;
}

.modal-btn.airtable:hover {
    background: #14a8e0;
}

.modal-btn.eafay {
    background: #f0ad4e;
    color: #000;
}

.modal-btn.eafay:hover {
    background: #ec971f;
}

/* Mobile modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-image {
        height: 180px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
        text-align: center;
    }
}

/* Participant Select */
.participant-select {
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.8rem;
    max-width: 180px;
}

.participant-select option {
    background: var(--surface);
    color: var(--text);
}

/* Participant Links */
.participant-link {
    color: var(--ao3-red);
    text-decoration: none;
    font-size: 0.85rem;
}

.participant-link:hover {
    text-decoration: underline;
}

.participant-link + .participant-link::before {
    content: ', ';
    color: var(--text-muted);
}

/* Team Links */
.team-link, a.team {
    color: var(--text);
    text-decoration: none;
}

.team-link:hover, a.team:hover {
    color: var(--ao3-red);
    text-decoration: underline;
}

.more-participants {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 4px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 1.25rem;
    color: var(--text);
    margin: 0 0 8px 0;
    font-weight: 600;
}

.empty-state-message {
    font-size: 1rem;
    margin: 0;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Filter Active Banner */
.filter-active-banner {
    background: var(--ao3-red);
    color: #fff;
    padding: 10px 16px;
    margin-bottom: 16px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-active-banner .clear-filter {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
}

.filter-active-banner .clear-filter:hover {
    opacity: 1;
}

.filter-active-banner .view-as-link {
    color: #fff;
    text-decoration: underline;
    margin-left: auto;
}

/* Submissions Table */
.submissions-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.9rem;
}

.submissions-table th,
.submissions-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.submissions-table th {
    background: var(--surface-alt);
    font-weight: 600;
    white-space: nowrap;
}

.submissions-table tbody tr:hover {
    background: var(--surface-alt);
}

.submissions-table tbody tr.validated {
    border-left: 3px solid var(--success);
}

.submissions-table tbody tr.pending {
    border-left: 3px solid var(--warning);
}

.sort-link {
    color: var(--text);
    text-decoration: none;
}

.sort-link:hover {
    color: var(--ao3-red);
}

.sort-link.sorted {
    color: var(--ao3-red);
    font-weight: bold;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.validated {
    background: var(--success);
}

.status-dot.pending {
    background: var(--warning);
}

.col-title a {
    color: var(--ao3-red);
    text-decoration: none;
}

.col-title a:hover {
    text-decoration: underline;
}

.col-points {
    font-weight: bold;
    color: var(--success);
}

.col-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.col-actions {
    white-space: nowrap;
}

.action-link {
    color: var(--ao3-red);
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 8px;
}

.action-link:hover {
    text-decoration: underline;
}

.action-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
}

.action-btn.validate {
    background: var(--success);
    color: #fff;
}

.action-btn.undo {
    background: var(--warning);
    color: #000;
}

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

/* Participant Avatars (stacked like fandom-roles) */
.participant-avatars {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: row-reverse;
    z-index: 5;
}

.participant-avatars .avatar {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.participant-avatars .avatar:hover {
    transform: scale(1.1);
    z-index: 10;
}

.participant-avatars .avatar:last-child {
    margin-left: 0;
}

.participant-avatars .avatar-count {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Private submission indicator */
.private-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 14px;
    z-index: 5;
}

/* Wanderer/Hat aperiodic monotile pattern for teamless submissions */
.submission-card.no-team-pattern .card-image.no-image,
.modal-image.no-image.no-team-pattern {
    --c1: var(--pattern-color1, #555);
    --c2: var(--pattern-color2, #777);
    /* The "hat" aperiodic monotile - actual 13-sided einstein tile */
    background-color: var(--c2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='104' height='90' viewBox='0 0 104 90'%3E%3Cdefs%3E%3Cpolygon id='hat' points='26,0 52,0 65,22.5 52,45 65,67.5 52,90 26,90 13,67.5 0,45 13,22.5 26,45 39,22.5'/%3E%3C/defs%3E%3Cuse href='%23hat' fill='%23555' opacity='0.85'/%3E%3Cuse href='%23hat' fill='%23666' opacity='0.85' transform='translate(52,0)'/%3E%3Cuse href='%23hat' fill='%23777' opacity='0.7' transform='translate(26,45) scale(0.5)'/%3E%3C/svg%3E");
    background-size: 104px 90px;
}

/* Bonus Chips - in card footer, not overlapping buttons */
.bonus-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.bonus-chip {
    background: var(--success);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Modal bonus chips */
.modal-bonuses {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.modal-bonuses .bonus-chip {
    font-size: 0.75rem;
    padding: 3px 8px;
}

/* Responsive table */
@media (max-width: 768px) {
    .submissions-table {
        font-size: 0.8rem;
    }

    .submissions-table th,
    .submissions-table td {
        padding: 6px 8px;
    }

    .col-challenge,
    .col-participants,
    .col-date {
        display: none;
    }

    .participant-select {
        max-width: 120px;
    }
}

/* Validation Checklist */
.validation-checklist {
    margin-top: 4px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--surface-dark);
    border-radius: 8px;
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.checklist-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.checklist-config-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.checklist-config-btn:hover {
    background: var(--surface);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.checklist-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.checklist-item:first-child {
    padding-top: 0;
}

.checklist-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: var(--success);
    cursor: pointer;
    margin: 0;
}

.checklist-item span {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.4;
}

.checklist-item.checked span {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Checklist Config Modal */
.checklist-config-content {
    max-width: 500px;
}

.checklist-config-content h2 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.config-help {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

#checklist-config-items {
    margin-bottom: 16px;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.config-item input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
}

.config-item input[type="text"]:focus {
    outline: none;
    border-color: var(--ao3-red);
}

.config-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.config-item-remove:hover {
    color: var(--error);
    background: rgba(255, 77, 77, 0.1);
}

.config-add-item {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.config-add-item input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
}

.config-add-item input[type="text"]:focus {
    outline: none;
    border-color: var(--ao3-red);
}

.config-add-item button {
    padding: 8px 16px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.config-add-item button:hover {
    background: #1d8348;
}

.config-actions {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.config-reset {
    padding: 8px 16px;
    background: none;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s, border-color 0.2s;
}

.config-reset:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.config-done {
    padding: 8px 20px;
    background: var(--ao3-red);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.config-done:hover {
    background: #7a1a1a;
}

/* Check-In List View */
.checkin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkin-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.checkin-row:hover {
    border-color: var(--ao3-red);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkin-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.checkin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.checkin-meta span {
    display: inline-flex;
    align-items: center;
}

.checkin-participant {
    color: var(--text);
    font-weight: 500;
}

.checkin-team {
    color: var(--ao3-red);
}

.checkin-period {
    background: var(--surface-dark);
    padding: 2px 8px;
    border-radius: 10px;
}

.checkin-date {
    margin-left: auto;
}

.checkin-row.empty {
    opacity: 0.5;
    background: var(--surface-dark);
}

.checkin-row.empty .checkin-content {
    color: var(--text-muted);
}

/* Audio Player */
.audio-player-container {
    background: var(--surface-dark);
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.audio-player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-btn {
    background: var(--ao3-red);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.audio-btn:hover {
    background: #7a1a1a;
}

/* CSS-based play/pause icons */
.icon-play {
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-left: 3px;
}

.icon-pause {
    width: 10px;
    height: 12px;
    border-left: 3px solid white;
    border-right: 3px solid white;
}

/* Skip icons for miniplayer */
.icon-skip-back,
.icon-skip-forward {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    position: relative;
}

.icon-skip-back {
    border-right: 8px solid white;
}

.icon-skip-back::before {
    content: '';
    position: absolute;
    left: -10px;
    top: -5px;
    width: 2px;
    height: 10px;
    background: white;
}

.icon-skip-forward {
    border-left: 8px solid white;
}

.icon-skip-forward::after {
    content: '';
    position: absolute;
    right: -10px;
    top: -5px;
    width: 2px;
    height: 10px;
    background: white;
}

.audio-btn.audio-close {
    background: var(--surface);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

.audio-btn.audio-close:hover {
    background: var(--border);
    color: var(--text);
}

.audio-progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.audio-progress {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.audio-progress-bar {
    height: 100%;
    background: var(--ao3-red);
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* Floating Mini Player */
.floating-player {
    position: fixed;
    top: 16px;
    right: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1001;
    min-width: 280px;
    max-width: 320px;
}

.floating-player-title {
    font-size: 0.8rem;
    color: var(--text);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.floating-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.floating-player .audio-btn.small {
    width: 32px;
    height: 32px;
}

.floating-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.floating-progress .audio-progress {
    height: 6px;
}

.floating-progress .audio-time {
    font-size: 0.7rem;
}

.floating-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-indicator {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: var(--surface-dark);
    padding: 2px 6px;
    border-radius: 8px;
}

/* Floating player header with drag handle */
.floating-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    cursor: grab;
    user-select: none;
}

.floating-player-header:active {
    cursor: grabbing;
}

.floating-player-header .floating-player-title {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.floating-player-header-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

/* Floating player action buttons */
.floating-player-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    justify-content: center;
}

.floating-action-btn {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--surface-dark);
    color: var(--text);
    border: 1px solid var(--border);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.floating-action-btn:hover {
    background: var(--ao3-red);
    color: white;
    border-color: var(--ao3-red);
}

/* Prev/Next icons */
.icon-prev,
.icon-next {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    display: inline-block;
}

.icon-prev {
    border-right: 8px solid white;
}

.icon-next {
    border-left: 8px solid white;
}

/* Dragging state */
.floating-player.dragging {
    opacity: 0.9;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.modal-btn.audio-load {
    background: var(--surface-dark);
    color: var(--text);
    border: 1px solid var(--border);
    margin-top: 8px;
}

.modal-btn.audio-load:hover {
    background: var(--surface);
    border-color: var(--ao3-red);
}

.modal-btn.audio-load:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Settings Button */
.settings-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1rem;
}

.settings-btn:hover {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.1);
}

/* Settings Modal */
.settings-content {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.settings-help {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.custom-css-textarea {
    width: 100%;
    min-height: 150px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-alt);
    resize: vertical;
}

.settings-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.css-reference details {
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
}

.css-reference summary {
    cursor: pointer;
    font-weight: 500;
}

.css-reference ul {
    margin: 8px 0 0 16px;
    font-size: 0.85rem;
}

.css-reference code {
    background: var(--surface-alt);
    padding: 2px 4px;
    border-radius: 2px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
}

/* Discord Link Chips */
.discord-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.discord-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #5865F2;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: background 0.2s;
}

.discord-chip:hover {
    background: #4752C4;
    text-decoration: none;
    color: white;
}

.discord-chip-icon {
    width: 14px;
    height: 14px;
}

.discord-chip-name {
    font-weight: 500;
}

.discord-chip-time {
    opacity: 0.8;
    font-size: 0.7rem;
    margin-left: 2px;
}
