/* Base Layout */
.speedruns-wrapper {
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 78px;
    padding-bottom: 80px;
    background: #1a1f2e;
}

.speedruns-wrapper.sidebar-open {
    margin-left: 260px;
}

@media (max-width: 1329px) {
    .speedruns-wrapper.sidebar-open {
        margin-left: 0;
    }
}

.speedruns-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
}

/* Hero Section */
.speedruns-hero {
    background: #252b3d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 15px;
}

.speedruns-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.speedruns-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.speedruns-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.5));
    border-radius: 8px;
}

.speedruns-hero-text h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #fff;
}

.speedruns-hero-text p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.speedruns-hero-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.speedruns-hero-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.speedruns-hero-actions {
    display: flex;
    gap: 8px;
}

.speedruns-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.speedruns-stat i {
    font-size: 16px;
    color: #4a9eff;
}

.speedruns-stat-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.speedruns-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.speedruns-stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.speedruns-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #4a9eff;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-upload-btn:hover {
    background: #3b8eef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.speedruns-upload-btn i {
    font-size: 14px;
}

.speedruns-rules-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-rules-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
}

.speedruns-rules-btn i {
    font-size: 14px;
}

/* Layout Grid */
.speedruns-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 15px;
    align-items: start;
}

/* Cards */
.speedruns-board-card,
.speedruns-side-card {
    background: #252b3d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
}

.speedruns-side {
    display: grid;
    gap: 15px;
}

.speedruns-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.speedruns-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.speedruns-filter-group {
    display: flex;
    gap: 6px;
}

.speedruns-card-head-tight {
    margin-bottom: 12px;
}

.speedruns-card-head h2,
.speedruns-card-head h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #fff;
}

.speedruns-card-head h2 {
    font-size: 18px;
}

.speedruns-card-head h3 {
    font-size: 16px;
}

.speedruns-card-head h2 i,
.speedruns-card-head h3 i {
    color: #4a9eff;
    font-size: 16px;
}

/* Tabs */
.speedruns-board-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.speedruns-filter-btn,
.speedruns-sort-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-filter-btn i,
.speedruns-sort-btn i {
    font-size: 12px;
}

.speedruns-filter-btn:hover,
.speedruns-sort-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.speedruns-filter-btn.active {
    background: rgba(74, 158, 255, 0.15);
    border-color: rgba(74, 158, 255, 0.3);
    color: #4a9eff;
}

/* Sort Dropdown */
.speedruns-sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #252b3d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px;
    min-width: 180px;
    display: none;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.speedruns-sort-dropdown.active {
    display: block;
}

.speedruns-sort-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-sort-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.speedruns-sort-option.active {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
}

.speedruns-sort-option i {
    font-size: 12px;
    width: 14px;
}

.speedruns-filter-group {
    position: relative;
}

.speedruns-board-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-board-tab i {
    font-size: 12px;
}

.speedruns-board-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.speedruns-board-tab.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: white;
}

/* Filter Panel */
.speedruns-filter-panel {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
    gap: 12px;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
}

.speedruns-filter-panel.active {
    display: grid;
}

.speedruns-filter-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.speedruns-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.speedruns-filter-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-filter-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.speedruns-filter-select:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.08);
}

.speedruns-filter-actions {
    display: flex;
    gap: 6px;
}

.speedruns-filter-apply,
.speedruns-filter-clear {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-filter-apply {
    background: #4a9eff;
    border: none;
    color: white;
}

.speedruns-filter-apply:hover {
    background: #3b8eef;
}

.speedruns-filter-clear {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.speedruns-filter-clear:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

/* Table */
.speedruns-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
}

.speedruns-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.speedruns-table-simple {
    min-width: 480px;
}

.speedruns-table th,
.speedruns-table td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: middle;
}

.speedruns-table thead th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.speedruns-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

.speedruns-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.speedruns-table tbody tr:last-child {
    border-bottom: none;
}

/* Place Cell */
.speedruns-place-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.speedruns-trophy {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    background: transparent;
}

.speedruns-trophy-gold i {
    color: #fbbf24;
}

.speedruns-trophy-silver i {
    color: #d1d5db;
}

.speedruns-trophy-bronze i {
    color: #fb923c;
}

.speedruns-trophy-neutral {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
}

.speedruns-place-text {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

/* Runner */
.speedruns-runner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speedruns-runner-avatar-link {
    display: inline-flex;
    flex-shrink: 0;
}

.speedruns-runner-name-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.speedruns-profile-link {
    color: inherit;
    text-decoration: none;
}

.speedruns-profile-link:hover strong,
.speedruns-profile-link:hover h2 {
    text-decoration: underline;
    text-decoration-color: rgba(74, 158, 255, 0.7);
    text-underline-offset: 2px;
}

.speedruns-avatar {
    position: relative;
    overflow: hidden;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4a9eff, #6366f1);
    color: white;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.speedruns-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.speedruns-avatar-fallback {
    position: relative;
    z-index: 0;
    line-height: 1;
}

.speedruns-avatar-mod {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.speedruns-runner-meta strong,
.speedruns-mod-meta strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.speedruns-top-runner {
    font-weight: 700;
}

.speedruns-top-1 {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.speedruns-top-2 {
    color: #d1d5db;
    text-shadow: 0 0 8px rgba(209, 213, 219, 0.4);
}

.speedruns-top-3 {
    color: #fb923c;
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.4);
}

.speedruns-runner-meta span,
.speedruns-mod-meta span {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.speedruns-runner-meta span i {
    font-size: 10px;
    margin-right: 2px;
}

.speedruns-time {
    font-size: 13px;
    font-weight: 700;
    color: #4a9eff;
    white-space: nowrap;
}

.speedruns-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.speedruns-mobile-time {
    display: none;
}

.speedruns-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.speedruns-empty-row td {
    padding: 18px 14px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Sidebar Lists */
.speedruns-mod-list,
.speedruns-explore-list {
    display: grid;
    gap: 6px;
}

.speedruns-mod-item,
.speedruns-explore-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.speedruns-mod-item:hover,
.speedruns-explore-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.speedruns-mod-item {
    text-decoration: none;
    color: inherit;
}

.speedruns-explore-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 158, 255, 0.15);
    border-radius: 6px;
    color: #4a9eff;
    font-size: 14px;
    flex-shrink: 0;
}

.speedruns-explore-item strong {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* Rules Modal */
.speedruns-rules-overlay,
.speedruns-submit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.speedruns-rules-overlay.show {
    opacity: 1;
    pointer-events: all;
    z-index: 20001;
}

.speedruns-submit-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.speedruns-rules-modal,
.speedruns-submit-modal {
    background: #252b3d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.speedruns-rules-header,
.speedruns-submit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.speedruns-rules-header h3,
.speedruns-submit-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speedruns-rules-header h3 i,
.speedruns-submit-header h3 i {
    color: #4a9eff;
    font-size: 18px;
}

.speedruns-rules-close,
.speedruns-submit-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.speedruns-rules-close:hover,
.speedruns-submit-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.speedruns-submit-notice {
    padding: 12px 20px;
    background: rgba(74, 158, 255, 0.08);
    border-bottom: 1px solid rgba(74, 158, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4a9eff;
}

.speedruns-submit-notice[data-state="error"] {
    background: rgba(239, 68, 68, 0.1);
    border-bottom-color: rgba(239, 68, 68, 0.22);
    color: #ff8d8d;
}

.speedruns-submit-notice[data-state="success"] {
    background: rgba(34, 197, 94, 0.1);
    border-bottom-color: rgba(34, 197, 94, 0.22);
    color: #8fe0ab;
}

.speedruns-submit-notice i {
    font-size: 16px;
    flex-shrink: 0;
}

.speedruns-rules-body {
    padding: 18px;
    display: grid;
    gap: 10px;
}

.speedruns-popup-rule {
    padding: 12px 14px;
    background: rgba(74, 158, 255, 0.08);
    border: 1px solid rgba(74, 158, 255, 0.15);
    border-left: 3px solid #4a9eff;
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.speedruns-popup-rule-warning {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.speedruns-submit-body {
    padding: 16px 20px;
    display: grid;
    gap: 16px;
}

.speedruns-submit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.speedruns-submit-field label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 4px;
}

.speedruns-submit-field label .required {
    color: #ef4444;
    font-size: 14px;
}

.speedruns-submit-field input[type="text"] {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.speedruns-submit-field input[type="text"]:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.speedruns-submit-field small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: -2px;
}

.speedruns-time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.speedruns-time-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.speedruns-time-input-group input {
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    width: 100%;
}

.speedruns-time-input-group input:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.speedruns-time-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.speedruns-time-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.speedruns-time-sep {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    margin-top: -16px;
    flex-shrink: 0;
}

.speedruns-submit-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.speedruns-submit-cancel,
.speedruns-submit-confirm {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.speedruns-submit-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.speedruns-submit-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.speedruns-submit-confirm {
    background: #4a9eff;
    border: none;
    color: white;
}

.speedruns-submit-confirm:hover {
    background: #3b8eef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.speedruns-submit-confirm:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.speedruns-submit-rules {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.speedruns-rules-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.speedruns-rules-checkbox input[type="checkbox"] {
    display: none;
}

.speedruns-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
}

.speedruns-rules-checkbox input[type="checkbox"]:checked + .speedruns-checkbox-custom {
    background: #4a9eff;
    border-color: #4a9eff;
}

.speedruns-rules-checkbox input[type="checkbox"]:checked + .speedruns-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.speedruns-rules-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.speedruns-rules-link {
    background: none;
    border: none;
    color: #4a9eff;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    transition: color 0.2s;
}

.speedruns-rules-link:hover {
    color: #3b8eef;
}

/* Utilities */
.speedruns-scroll-sentinel {
    height: 1px;
}

.speedruns-run-row.is-hidden,
.speedruns-table.is-hidden {
    display: none;
}

.speedruns-run-row {
    cursor: pointer;
}

.speedruns-run-row:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.speedruns-review-panel {
    margin-bottom: 16px;
    padding: 14px;
    background: rgba(74, 158, 255, 0.08);
    border: 1px solid rgba(74, 158, 255, 0.16);
    border-radius: 10px;
    display: grid;
    gap: 12px;
}

.speedruns-owner-panel {
    margin-bottom: 16px;
    padding: 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.16);
    border-radius: 10px;
    display: grid;
    gap: 12px;
}

.speedruns-owner-panel.is-hidden {
    display: none;
}

.speedruns-review-panel.is-hidden {
    display: none;
}

.speedruns-review-copy {
    display: grid;
    gap: 4px;
}

.speedruns-review-copy strong {
    font-size: 14px;
    color: #fff;
}

.speedruns-review-copy span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}

.speedruns-review-controls {
    display: grid;
    gap: 10px;
}

.speedruns-review-controls input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-family: inherit;
}

.speedruns-review-controls input:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.08);
}

.speedruns-review-actions {
    display: flex;
    gap: 8px;
}

.speedruns-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-review-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.speedruns-review-delete {
    background: linear-gradient(135deg, #8f1d1d, #c23636);
}

.speedruns-review-approve {
    background: #22c55e;
}

.speedruns-review-approve:hover {
    background: #16a34a;
}

.speedruns-review-reject {
    background: #ef4444;
}

.speedruns-review-reject:hover {
    background: #dc2626;
}

/* Detail View */
.speedruns-detail-view {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 15px;
    align-items: start;
}

.speedruns-detail-main {
    background: #252b3d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
}

.speedruns-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-bottom: 16px;
}

.speedruns-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.speedruns-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.speedruns-video-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(10, 14, 24, 0.92);
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.speedruns-video-loading.is-active {
    opacity: 1;
}

.speedruns-video-loading-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: #4a9eff;
    animation: spin 0.8s linear infinite;
}

.speedruns-detail-info {
    margin-bottom: 16px;
}

.speedruns-detail-header {
    margin-bottom: 12px;
}

.speedruns-detail-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.speedruns-player-info {
    flex: 1;
    min-width: 0;
}

.speedruns-player-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.speedruns-detail-player h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.speedruns-detail-rank-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.speedruns-detail-rank-badge.rank-1 {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.speedruns-detail-rank-badge.rank-2 {
    background: rgba(209, 213, 219, 0.15);
    color: #d1d5db;
}

.speedruns-detail-rank-badge.rank-3 {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.speedruns-detail-rank-badge.rank-other {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
}

.speedruns-detail-player span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.speedruns-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.speedruns-detail-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.speedruns-detail-stat i {
    font-size: 18px;
    color: #4a9eff;
}

.speedruns-detail-stat .speedruns-avatar-mod {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.speedruns-detail-stat span {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
}

.speedruns-detail-stat strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

/* Comments Section */
.speedruns-comments-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.speedruns-comments-section h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speedruns-comments-section h3 i {
    color: #4a9eff;
    font-size: 16px;
}

.speedruns-comment-input-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.speedruns-comment-guest {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.speedruns-comment-meta {
    margin-top: -4px;
    margin-bottom: 10px;
    font-size: 12px;
}

.speedruns-comment-meta span {
    color: rgba(255, 255, 255, 0.55);
}

.speedruns-comment-meta span[data-state="cooldown"] {
    color: #f59e0b;
}

.speedruns-comment-meta span[data-state="error"] {
    color: #ef4444;
}

.speedruns-comment-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
    resize: none;
    min-height: 36px;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.4;
}

.speedruns-comment-input::-webkit-scrollbar {
    width: 4px;
}

.speedruns-comment-input::-webkit-scrollbar-track {
    background: transparent;
}

.speedruns-comment-input::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.speedruns-comment-input:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.08);
}

.speedruns-comment-guest-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.speedruns-comment-guest-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(74, 158, 255, 0.3);
    color: rgba(255, 255, 255, 0.82);
}

.speedruns-comment-submit {
    padding: 8px 12px;
    background: #4a9eff;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    height: 36px;
}

.speedruns-comment-submit:hover {
    background: #3b8eef;
    transform: translateY(-1px);
}

.speedruns-comment-submit:disabled,
.speedruns-comment-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.speedruns-comments-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.speedruns-comments-container::-webkit-scrollbar {
    width: 6px;
}

.speedruns-comments-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.speedruns-comments-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.speedruns-comments-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.speedruns-comments-list {
    display: grid;
    gap: 8px;
}

.speedruns-comment-item {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: all 0.2s;
}

.speedruns-comment-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.speedruns-comment-empty {
    align-items: center;
}

.speedruns-comment-item .speedruns-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.speedruns-comment-content {
    flex: 1;
    min-width: 0;
}

.speedruns-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.speedruns-comment-user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.speedruns-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.speedruns-comment-header .speedruns-comment-user {
    min-width: 0;
}

.speedruns-comment-delete {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.speedruns-comment-delete:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ff8d8d;
    transform: translateY(-1px);
}

.speedruns-comment-author {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.speedruns-comment-user strong {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.speedruns-comment-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.speedruns-comment-text {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.speedruns-comment-actions {
    display: flex;
    gap: 8px;
}

.speedruns-comment-heart {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.speedruns-comment-heart:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.speedruns-comment-heart.hearted {
    color: #ef4444;
}

.speedruns-comment-heart.hearted i {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Responsive */
@media (max-width: 1024px) {
    .speedruns-layout {
        grid-template-columns: 1fr;
    }
    
    .speedruns-detail-view {
        grid-template-columns: 1fr;
    }
    
    .speedruns-side {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 1070px) {
    .speedruns-layout {
        grid-template-columns: 1fr;
    }

    .speedruns-side {
        display: none;
    }
}

@media (max-width: 768px) {
    .speedruns-wrapper {
        padding-top: 70px;
    }
    
    .speedruns-wrapper.sidebar-open {
        margin-left: 0;
    }
    
    .speedruns-container {
        padding: 10px;
        padding-bottom: 100px;
    }
    
    .speedruns-hero {
        padding: 12px 14px;
    }
    
    .speedruns-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    
    .speedruns-hero-left {
        width: 100%;
    }
    
    .speedruns-logo {
        width: 56px;
        height: 56px;
    }
    
    .speedruns-hero-text h1 {
        font-size: 18px;
    }
    
    .speedruns-hero-right {
        width: 100%;
        align-items: stretch;
    }
    
    .speedruns-hero-stats {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .speedruns-stat {
        padding: 6px 8px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }
    
    .speedruns-stat i {
        font-size: 14px;
    }
    
    .speedruns-stat-value {
        font-size: 13px;
    }
    
    .speedruns-hero-actions {
        width: 100%;
    }

    .speedruns-upload-btn,
    .speedruns-rules-btn {
        flex: 1;
        justify-content: center;
    }
    
    .speedruns-board-card,
    .speedruns-side-card {
        padding: 12px;
    }
    
    .speedruns-card-head {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .speedruns-filters {
        width: 100%;
        align-items: stretch;
    }
    
    .speedruns-filter-group {
        width: 100%;
    }
    
    .speedruns-filter-btn,
    .speedruns-sort-btn {
        flex: 1;
        justify-content: center;
    }
    
    .speedruns-board-tabs {
        width: 100%;
    }
    
    .speedruns-board-tab {
        flex: 1;
        justify-content: center;
    }
    
    .speedruns-filter-panel {
        grid-template-columns: 1fr;
    }
    
    .speedruns-filter-actions {
        width: 100%;
    }
    
    .speedruns-filter-apply,
    .speedruns-filter-clear {
        flex: 1;
    }
    
    .speedruns-table {
        min-width: 0;
    }
    
    .speedruns-table thead th:nth-child(3),
    .speedruns-table-verified tbody td:nth-child(3),
    .speedruns-table thead th:nth-child(4),
    .speedruns-table-verified tbody td:nth-child(4) {
        display: none;
    }
    
    .speedruns-mobile-time {
        display: inline;
        margin-left: 6px;
        font-size: 11px;
    }
    
    .speedruns-table-simple {
        min-width: 440px;
    }
    
    .speedruns-rules-overlay {
        align-items: flex-end;
    }
    
    .speedruns-rules-modal {
        width: 100%;
        max-width: none;
        border-radius: 12px 12px 0 0;
    }
    
    .speedruns-side {
        grid-template-columns: 1fr;
    }
    
    .speedruns-detail-stats {
        grid-template-columns: 1fr;
    }

    .speedruns-review-actions {
        flex-direction: column;
    }
    
    .speedruns-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .speedruns-detail-rank {
        font-size: 36px;
    }
}
