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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #e0e0e0;
    line-height: 1.6;
}

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

header {
    margin-bottom: 3rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content > div:first-child {
    text-align: left;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.user-info-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(233, 69, 96, 0.5);
}

.nav-username {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 0.9rem;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid #e94560;
    color: #ff6b6b;
}

.alert-success {
    background: rgba(46, 213, 115, 0.2);
    border: 1px solid #2ed573;
    color: #7bed9f;
}

.upload-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-section h2 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.upload-section > p {
    color: #888;
    margin-bottom: 1.5rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.file-input-wrapper {
    width: 100%;
    max-width: 500px;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    border: 2px dashed rgba(233, 69, 96, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(233, 69, 96, 0.1);
}

.file-label:hover {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.2);
}

.file-label.file-selected {
    border-color: #2ed573;
    background: rgba(46, 213, 115, 0.15);
}

.file-label.file-selected:hover {
    background: rgba(46, 213, 115, 0.25);
}

.file-label.file-selected .file-icon,
.file-label.file-selected .file-text {
    color: #2ed573;
}

.file-label.file-error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

.file-label.file-error:hover {
    background: rgba(255, 107, 107, 0.25);
}

.file-label.file-error .file-icon,
.file-label.file-error .file-text {
    color: #ff6b6b;
}

.file-icon {
    font-size: 2rem;
    color: #e94560;
}

.file-text {
    font-size: 1.1rem;
    color: #e94560;
}

.file-name {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    color: #888;
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    vertical-align: middle;
    line-height: 1.2;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.progress-container {
    width: 100%;
    max-width: 500px;
    margin: 1rem 0;
}

.progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.6);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

#progressLabel {
    color: #e94560;
    font-weight: 500;
}

#progressPercent {
    color: #e94560;
    font-weight: 600;
}

.upload-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

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

.feature {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature p {
    color: #888;
    font-size: 0.9rem;
}

.landing-features {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.features-intro {
    text-align: center;
    color: #aaa;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

.features-grid-large {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-large {
    padding: 2rem;
    text-align: left;
}

.feature-large .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-large h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-large p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.cta-section {
    text-align: center;
    margin-top: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(233, 69, 96, 0.2);
}

.cta-section h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: #aaa;
    margin-bottom: 1.5rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.light-theme .landing-features {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .features-section h2 {
    color: #222;
}

.light-theme .features-intro {
    color: #555;
}

.light-theme .feature-large h3 {
    color: #222;
}

.light-theme .feature-large p {
    color: #444;
}

.light-theme .cta-section {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.08) 0%, rgba(255, 107, 107, 0.04) 100%);
    border-color: rgba(233, 69, 96, 0.15);
}

.light-theme .cta-section h3 {
    color: #333;
}

.light-theme .cta-section p {
    color: #666;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.results-header h2 {
    color: #fff;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.meta-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.meta-label {
    color: #888;
}

.meta-value {
    color: #e94560;
    font-weight: 500;
}

.light-theme .meta-info-bar {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .meta-label {
    color: #666;
}

.light-theme .meta-value {
    color: #d63050;
}

.results-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.result-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-section.full-width {
    grid-column: 1 / -1;
}

.result-section h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    color: #888;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    color: #e0e0e0;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.d20-section {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1), rgba(255, 107, 107, 0.05));
}

.d20-table .nat-20 {
    color: #2d8659;
    font-weight: 600;
}

.d20-table .nat-1 {
    color: #ff4757;
    font-weight: 600;
}

.d20-table .checkbox-col {
    width: 40px;
    text-align: center;
    padding: 0.5rem;
}

.d20-table .player-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e94560;
}

.d20-table thead .checkbox-col {
    background: rgba(233, 69, 96, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    margin-bottom: 0;
}

.section-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(233, 69, 96, 0.5);
}

.view-toggle-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-btn:first-child {
    border-right: 1px solid rgba(233, 69, 96, 0.5);
}

.view-toggle-btn:hover {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.view-toggle-btn.active {
    background: rgba(233, 69, 96, 0.3);
    color: #e94560;
}

.owner-stats-hint {
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.owner-row {
    transition: all 0.2s ease;
}

.owner-row:hover {
    background: rgba(233, 69, 96, 0.1) !important;
}

.d20-table .owner-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e94560;
}

.expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid rgba(233, 69, 96, 0.5);
    border-radius: 6px;
    color: #e94560;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
}

.expand-icon {
    font-weight: bold;
    font-size: 1.1rem;
}

.filter-hint {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.player-row {
    transition: all 0.2s ease;
}

.player-row:hover {
    background: rgba(233, 69, 96, 0.1) !important;
}

.player-row label {
    cursor: pointer;
}

.histogram-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.histogram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.histogram-header h4 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
}

.filter-label {
    color: #e94560;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(233, 69, 96, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.chart-wrapper {
    height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.history-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-section h2 {
    margin-bottom: 1.5rem;
    color: #fff;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(233, 69, 96, 0.3);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-filename {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.history-date {
    color: #888;
    font-size: 0.85rem;
}

.history-stats {
    color: #e94560;
    font-size: 0.8rem;
    font-weight: 500;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.4);
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.3);
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.login-prompt {
    text-align: center;
    padding: 2rem;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 12px;
    border: 1px dashed rgba(233, 69, 96, 0.4);
}

.login-prompt p {
    color: #888;
    font-size: 1.1rem;
}

.login-prompt a {
    color: #e94560;
    font-weight: 600;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.admin-section {
    margin-top: 2rem;
}

.admin-section h2 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.user-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(233, 69, 96, 0.5);
}

.user-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
}

.user-email {
    color: #888;
    font-size: 0.9rem;
}

.user-joined {
    color: #666;
    font-size: 0.8rem;
}

.user-stats-summary {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.user-uploads {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-uploads h4 {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-list.compact .history-item {
    padding: 0.75rem 1rem;
}

.history-list.compact .history-filename {
    font-size: 0.9rem;
}

.history-list.compact .history-stats {
    font-size: 0.75rem;
}

.no-uploads {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.error-section {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.error-section h2 {
    color: #ff4757;
    margin-bottom: 1rem;
}

.error-section p {
    color: #888;
    margin-bottom: 1.5rem;
}

.trophies-section {
    margin-bottom: 2rem;
}

.trophies-title {
    color: #fff;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.trophy-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    border: 2px solid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trophy-card:hover {
    transform: translateY(-3px);
}

.trophy-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

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

.trophy-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.trophy-player {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trophy-description {
    font-size: 0.85rem;
    color: #888;
}

.trophy-details {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.trophy-gold {
    background: linear-gradient(135deg, rgba(45, 134, 89, 0.15), rgba(39, 174, 96, 0.08));
    border-color: rgba(45, 134, 89, 0.5);
}

.trophy-gold .trophy-icon {
    background: linear-gradient(135deg, #2d8659, #27ae60);
    color: #fff;
}

.trophy-gold .trophy-title {
    color: #2d8659;
}

.trophy-gold:hover {
    box-shadow: 0 8px 25px rgba(45, 134, 89, 0.3);
}

.trophy-cursed {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), rgba(255, 71, 87, 0.05));
    border-color: rgba(255, 71, 87, 0.5);
}

.trophy-cursed .trophy-icon {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #1a1a2e;
}

.trophy-cursed .trophy-title {
    color: #ff4757;
}

.trophy-cursed:hover {
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.3);
}

.trophy-silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
    border-color: rgba(192, 192, 192, 0.5);
}

.trophy-silver .trophy-icon {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #1a1a2e;
}

.trophy-silver .trophy-title {
    color: #c0c0c0;
}

.trophy-silver:hover {
    box-shadow: 0 8px 25px rgba(192, 192, 192, 0.3);
}

.trophy-meme {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(138, 43, 226, 0.05));
    border-color: rgba(138, 43, 226, 0.5);
}

.trophy-meme .trophy-icon {
    background: linear-gradient(135deg, #8a2be2, #9b59b6);
    color: #fff;
}

.trophy-meme .trophy-title {
    color: #9b59b6;
}

.trophy-meme:hover {
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .upload-section {
        padding: 1.5rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .action-buttons .btn {
        flex: 1;
        text-align: center;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .history-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .trophies-grid {
        grid-template-columns: 1fr;
    }
    
    .trophy-card {
        padding: 1rem;
    }
    
    .trophy-icon {
        width: 50px;
        height: 50px;
    }
    
    .trophy-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .trophy-title {
        font-size: 1rem;
    }
    
    .trophy-player {
        font-size: 0.9rem;
    }
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.theme-toggle-icon {
    font-size: 1rem;
}

.theme-toggle-text {
    font-size: 0.85rem;
    color: #e0e0e0;
}

/* Light Theme Styles */
body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    color: #333;
}

body.light-theme .container {
    color: #333;
}

body.light-theme header h1 {
    background: linear-gradient(135deg, #d63384, #e94560);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .subtitle {
    color: #666;
}

body.light-theme .upload-section,
body.light-theme .history-section,
body.light-theme .result-section,
body.light-theme .stat-card,
body.light-theme .feature,
body.light-theme .user-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.light-theme .upload-section h2,
body.light-theme .history-section h2,
body.light-theme .result-section h3,
body.light-theme .feature h3,
body.light-theme .results-header h2,
body.light-theme .trophies-title {
    color: #222;
}

body.light-theme .upload-section > p,
body.light-theme .feature p,
body.light-theme .stat-label,
body.light-theme .history-date {
    color: #666;
}

body.light-theme .file-label {
    background: rgba(233, 69, 96, 0.08);
    border-color: rgba(233, 69, 96, 0.4);
}

body.light-theme .file-label:hover {
    background: rgba(233, 69, 96, 0.15);
}

body.light-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .data-table th {
    color: #666;
}

body.light-theme .data-table td {
    color: #333;
}

body.light-theme .data-table th,
body.light-theme .data-table td {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .data-table tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .history-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .history-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.light-theme .history-filename,
body.light-theme .trophy-player,
body.light-theme .user-name {
    color: #222;
}

body.light-theme .nav-username {
    color: #333;
}

body.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .theme-toggle-text {
    color: #333;
}

body.light-theme .d20-section {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.08), rgba(255, 107, 107, 0.03));
}

body.light-theme .expand-btn {
    background: rgba(233, 69, 96, 0.1);
    border-color: rgba(233, 69, 96, 0.4);
}

body.light-theme .view-toggle {
    border-color: rgba(233, 69, 96, 0.4);
}

body.light-theme .view-toggle-btn {
    color: #666;
}

body.light-theme .view-toggle-btn:first-child {
    border-right-color: rgba(233, 69, 96, 0.4);
}

body.light-theme .view-toggle-btn:hover {
    background: rgba(233, 69, 96, 0.15);
    color: #c93050;
}

body.light-theme .view-toggle-btn.active {
    background: rgba(233, 69, 96, 0.2);
    color: #c93050;
}

body.light-theme .owner-stats-hint {
    color: #666;
}

body.light-theme .histogram-container {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .chart-wrapper {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .filter-label {
    background: rgba(233, 69, 96, 0.1);
}

body.light-theme footer {
    color: #888;
}

body.light-theme .trophy-description,
body.light-theme .trophy-details {
    color: #666;
}

body.light-theme .login-prompt {
    background: rgba(233, 69, 96, 0.08);
    border-color: rgba(233, 69, 96, 0.3);
}

body.light-theme .login-prompt p {
    color: #666;
}

/* Owner Assignment Styles */
.owner-assignment-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .owner-assignment-section {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

.owner-assignment-section h3 {
    color: #fff;
    margin-bottom: 1rem;
}

body.light-theme .owner-assignment-section h3 {
    color: #222;
}

.owner-assignment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.owner-assignment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .owner-assignment-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.owner-player-name {
    flex: 0 0 120px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-theme .owner-player-name {
    color: #222;
}

.owner-input-wrapper {
    flex: 1;
    position: relative;
}

.owner-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

body.light-theme .owner-input {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.15);
    color: #333;
}

.owner-input:focus {
    outline: none;
    border-color: #e94560;
}

.owner-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

body.light-theme .owner-dropdown {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.owner-dropdown.show {
    display: block;
}

.owner-dropdown-item {
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    color: #e0e0e0;
}

body.light-theme .owner-dropdown-item {
    color: #333;
}

.owner-dropdown-item:hover {
    background: rgba(233, 69, 96, 0.2);
}

.ignore-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ignore-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #e94560;
    cursor: pointer;
}

.ignore-label {
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
}

.owner-save-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
}

.owner-status {
    display: inline-block;
    margin-left: 1rem;
    font-size: 0.9rem;
    color: #2ed573;
}

.owner-status.error {
    color: #ff4757;
}

/* Owner Trophies Section */
.owner-trophies-section {
    margin-top: 2rem;
}

.owner-trophies-message {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: #888;
    font-style: italic;
}

body.light-theme .owner-trophies-message {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.15);
    color: #666;
}

.trophy-bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
    border-color: rgba(205, 127, 50, 0.5);
}

.trophy-bronze .trophy-icon {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #1a1a2e;
}

.trophy-bronze .trophy-title {
    color: #cd7f32;
}

.trophy-bronze:hover {
    box-shadow: 0 8px 25px rgba(205, 127, 50, 0.3);
}

/* Player table with owner column */
.owner-display {
    color: #e94560;
    font-weight: 500;
    font-size: 0.85rem;
}

.owner-display.ignored {
    color: #888;
    font-style: italic;
}

/* Friends Page Styles */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.friend-code-section,
.add-friend-section {
    padding: 1.5rem;
}

.friend-code-description,
.add-friend-description {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.friend-code-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(233, 69, 96, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

.friend-code {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e94560;
    letter-spacing: 2px;
}

.add-friend-form {
    display: flex;
    gap: 1rem;
}

.friend-code-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.light-theme .friend-code-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.friend-code-input::placeholder {
    color: #666;
    text-transform: none;
    letter-spacing: normal;
}

.friend-message {
    display: none;
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    text-align: center;
}

.friend-message.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.friend-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.friends-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.friends-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

body.light-theme .friends-section h3 {
    color: #222;
}

.friend-list,
.friend-requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.friend-item,
.friend-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .friend-item,
body.light-theme .friend-request-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

.friend-name {
    font-weight: 500;
    color: #fff;
}

body.light-theme .friend-name {
    color: #222;
}

.pending-badge {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.friend-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.2);
}

.empty-state {
    color: #888;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.shared-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shared-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .shared-result-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.shared-result-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.shared-result-filename {
    font-weight: 500;
    color: #fff;
}

body.light-theme .shared-result-filename {
    color: #222;
}

.shared-result-meta {
    font-size: 0.85rem;
    color: #888;
}

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

.share-modal-overlay.active {
    display: flex;
}

.share-modal {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

body.light-theme .share-modal {
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.share-modal h3 {
    margin-bottom: 1rem;
    color: #fff;
}

body.light-theme .share-modal h3 {
    color: #222;
}

.share-modal-description {
    color: #888;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.share-friend-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.share-friend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.share-friend-item:hover {
    background: rgba(233, 69, 96, 0.1);
}

.share-friend-item.selected {
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid rgba(233, 69, 96, 0.5);
}

body.light-theme .share-friend-item {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .share-friend-item:hover {
    background: rgba(233, 69, 96, 0.1);
}

.share-friend-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #e94560;
}

.share-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.share-empty-state {
    text-align: center;
    padding: 2rem;
    color: #888;
}

.share-empty-state a {
    color: #e94560;
}

/* Share button in results - normalize button element to match anchor styling */
.share-btn {
    font-family: inherit;
    vertical-align: middle;
}

.share-status {
    font-size: 0.85rem;
    color: #888;
    margin-left: 0.5rem;
}

.shared-view-banner {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.15), rgba(255, 107, 107, 0.08));
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shared-view-banner-icon {
    font-size: 1.5rem;
}

.shared-view-banner-text {
    color: #fff;
}

body.light-theme .shared-view-banner-text {
    color: #333;
}

.shared-view-banner-text strong {
    color: #e94560;
}

/* Collapsible sections */
.collapsible-section {
    transition: all 0.3s ease;
}

.section-collapse-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-collapse-header h3 {
    margin: 0;
}

.collapse-btn {
    background: none;
    border: none;
    color: #e94560;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.collapse-btn:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.collapsible-section.collapsed .collapse-btn {
    transform: rotate(-90deg);
}

.collapse-header-with-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.collapse-header-with-title h3 {
    margin: 0;
}

body.light-theme .collapse-btn {
    color: #e94560;
}

body.light-theme .collapse-btn:hover {
    color: #ff6b6b;
}

.update-info {
    color: #aaa;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.update-info strong {
    color: #2ed573;
}

.current-stats {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.current-stats h4 {
    color: #e94560;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-mini-grid {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-mini-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.stat-mini-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-date {
    color: #666;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

body.light-theme .update-info {
    color: #555;
}

body.light-theme .update-info strong {
    color: #27ae60;
}

body.light-theme .current-stats {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .current-stats h4 {
    color: #e94560;
}

body.light-theme .stat-mini-value {
    color: #333;
}

body.light-theme .stat-mini-label {
    color: #666;
}

body.light-theme .stat-date {
    color: #888;
}

.help-layout {
    display: flex;
    min-height: 100vh;
}

.help-sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #888;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    color: #e94560;
    background: rgba(233, 69, 96, 0.1);
    border-left-color: #e94560;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.help-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    max-width: 900px;
}

.help-header {
    margin-bottom: 2rem;
}

.help-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.help-section {
    scroll-margin-top: 100px;
}

.help-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #fff;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(233, 69, 96, 0.3);
}

.help-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-card h3 {
    font-size: 1.1rem;
    color: #e94560;
    margin-bottom: 0.75rem;
}

.help-card p {
    color: #b0b0b0;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.help-card p:last-child {
    margin-bottom: 0;
}

.help-list {
    padding-left: 1.5rem;
    color: #b0b0b0;
    line-height: 1.8;
}

.help-list li {
    margin-bottom: 0.5rem;
}

.help-list li strong {
    color: #e0e0e0;
}

.trophy-list {
    list-style: none;
    padding-left: 0;
}

.trophy-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.trophy-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.trophy-icon.gold { color: #2d8659; }
.trophy-icon.red { color: #e94560; }
.trophy-icon.blue { color: #00b4d8; }
.trophy-icon.purple { color: #9b59b6; }

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: rgba(233, 69, 96, 0.9);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .help-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 260px;
    }

    .help-sidebar.open {
        transform: translateX(0);
    }

    .help-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .help-section h2 {
        font-size: 1.4rem;
    }

    .help-card {
        padding: 1rem;
    }
}

body.light-theme .help-sidebar {
    background: rgba(0, 0, 0, 0.03);
    border-right-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .sidebar-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .sidebar-link {
    color: #666;
}

body.light-theme .sidebar-link:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .sidebar-link.active {
    color: #e94560;
    background: rgba(233, 69, 96, 0.08);
}

body.light-theme .sidebar-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .help-section h2 {
    color: #333;
    border-bottom-color: rgba(233, 69, 96, 0.2);
}

body.light-theme .help-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .help-card p {
    color: #555;
}

body.light-theme .help-list {
    color: #555;
}

body.light-theme .help-list li strong {
    color: #333;
}

.session-config-page {
    max-width: 800px;
    margin: 0 auto;
}

.assign-owners-page {
    max-width: 100%;
    margin: 0 auto;
}

.assign-owners-section {
    margin-bottom: 2rem;
}

.assign-owners-section h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.assign-owners-section .section-hint {
    margin-bottom: 1.5rem;
    color: #888;
}

.assign-owners-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.skip-hint {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

body.light-theme .assign-owners-section h3 {
    color: #333;
}

body.light-theme .skip-hint {
    color: #888;
}

.upload-info-card {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.upload-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4caf50;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.upload-info-header svg {
    flex-shrink: 0;
}

.upload-info-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.upload-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-label {
    color: #888;
    font-size: 0.9rem;
}

.detail-value {
    color: #e0e0e0;
    font-weight: 500;
}

.detail-value.update-mode {
    color: #ff9800;
}

.session-config-form-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.config-section h3 {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.config-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.config-description {
    color: #888;
    font-size: 0.95rem;
}

.master-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #888;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.master-toggle input:checked + .toggle-slider {
    background: rgba(233, 69, 96, 0.3);
}

.master-toggle input:checked + .toggle-slider::after {
    transform: translateX(24px);
    background: #e94560;
}

.master-toggle input {
    display: none;
}

.section-hint {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.session-rules-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.session-rule-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
    transition: opacity 0.3s, background 0.3s;
}

.session-rule-card.disabled {
    opacity: 0.5;
}

.session-rule-card.disabled .rule-input {
    background: rgba(0, 0, 0, 0.2);
}

.rule-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.rule-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e94560;
}

.rule-title {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.rule-description {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.rule-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rule-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 0.95rem;
    text-align: center;
}

.rule-input:focus {
    outline: none;
    border-color: #e94560;
}

.rule-input:disabled {
    color: #666;
    cursor: not-allowed;
}

.rule-unit {
    color: #888;
    font-size: 0.9rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.option-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
}

.option-label {
    display: block;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.option-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    padding-right: 2.5rem;
}

.option-select:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.12);
}

.option-select:focus {
    outline: none;
    border-color: #e94560;
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.option-select option {
    background: #1a1f3a;
    color: #fff;
    padding: 0.5rem;
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.option-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e94560;
}

.option-title {
    font-weight: 600;
    color: #e0e0e0;
}

.option-description {
    color: #888;
    font-size: 0.85rem;
    line-height: 1.4;
}

.config-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-large svg {
    flex-shrink: 0;
}

body.light-theme .upload-info-card {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.25);
}

body.light-theme .detail-value {
    color: #333;
}

body.light-theme .config-section {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .config-section h3 {
    color: #333;
}

body.light-theme .toggle-slider {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .toggle-slider::after {
    background: #999;
}

body.light-theme .master-toggle input:checked + .toggle-slider::after {
    background: #e94560;
}

body.light-theme .toggle-label {
    color: #333;
}

body.light-theme .session-rule-card,
body.light-theme .option-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .rule-title,
body.light-theme .option-title,
body.light-theme .option-label {
    color: #333;
}

body.light-theme .rule-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
}

body.light-theme .option-select {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333333'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

body.light-theme .option-select:hover {
    border-color: rgba(0, 0, 0, 0.35);
    background-color: rgba(0, 0, 0, 0.07);
}

body.light-theme .option-select:focus {
    border-color: #e94560;
    background-color: rgba(0, 0, 0, 0.07);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

body.light-theme .option-select option {
    background: #ffffff;
    color: #333;
}

body.light-theme .config-actions {
    border-top-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .session-rules-grid-page,
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .btn-large {
        justify-content: center;
    }
}

.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.delete-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.delete-modal-content {
    position: relative;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.delete-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ff6b6b;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.delete-modal-header svg {
    flex-shrink: 0;
}

.delete-modal-body {
    margin-bottom: 1.5rem;
}

.delete-modal-body p {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.delete-filename {
    color: #ff6b6b;
    font-weight: 500;
    word-break: break-all;
}

.delete-warning {
    color: #ff9800;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.delete-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.delete-modal-actions .btn {
    flex: 1;
}

body.light-theme .delete-modal-content {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .delete-modal-body p {
    color: #333;
}

body.light-theme .delete-modal-header svg {
    color: #e94560;
}

@media (max-width: 480px) {
    .delete-modal-content {
        padding: 1.5rem;
    }
    
    .delete-modal-actions {
        flex-direction: column;
    }
    
    .delete-modal-actions .btn {
        width: 100%;
    }
}

.sessions-section {
    margin-bottom: 2rem;
}

.sessions-section .section-title {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.3rem;
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.session-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.session-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(233, 69, 96, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.session-card-header .collapse-btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

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

.session-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.session-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #888;
}

.session-events {
    color: #e94560;
    font-weight: 500;
}

.session-duration {
    color: #888;
}

.session-card-content {
    padding: 1rem;
}

.session-trophies {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mini-trophy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.mini-trophy-icon {
    font-size: 1rem;
}

.mini-trophy-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-trophy.trophy-gold {
    background: rgba(45, 134, 89, 0.1);
    border: 1px solid rgba(45, 134, 89, 0.3);
    color: #2d8659;
}

.mini-trophy.trophy-cursed {
    background: rgba(139, 0, 0, 0.1);
    border: 1px solid rgba(139, 0, 0, 0.3);
    color: #ff6b6b;
}

.mini-trophy.trophy-silver {
    background: rgba(192, 192, 192, 0.1);
    border: 1px solid rgba(192, 192, 192, 0.3);
    color: #c0c0c0;
}

.session-stats-summary {
    overflow-x: auto;
}

.mini-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.mini-stats-table th,
.mini-stats-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-stats-table th {
    color: #888;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.mini-stats-table td {
    color: #e0e0e0;
}

.mini-stats-table .nat-20 {
    color: #2d8659;
    font-weight: 600;
}

.mini-stats-table .nat-1 {
    color: #ff6b6b;
    font-weight: 600;
}

.session-card.collapsed .session-card-content {
    display: none;
}

.session-card.collapsed .session-card-header .collapse-btn-small {
    transform: rotate(-90deg);
}

body.light-theme .session-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .session-card-header {
    background: rgba(233, 69, 96, 0.08);
}

body.light-theme .session-name {
    color: #333;
}

body.light-theme .mini-stats-table td {
    color: #333;
}

body.light-theme .sessions-section .section-title {
    color: #333;
}

@media (max-width: 600px) {
    .sessions-grid {
        grid-template-columns: 1fr;
    }
    
    .session-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}

.section-header-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
}

.section-header-btn {
    margin-left: 0;
}

.view-toggle-group {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.view-toggle-btn.active {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.view-toggle-btn svg {
    flex-shrink: 0;
}

.calendar-view {
    margin-top: 1rem;
}

.calendar-months-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.calendar-month {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 180px;
    max-width: 200px;
}

.calendar-month-header {
    text-align: center;
    font-weight: 600;
    color: #e94560;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #666;
    border-radius: 4px;
}

.calendar-day.empty {
    visibility: hidden;
}

.calendar-day.has-session {
    background: rgba(233, 69, 96, 0.3);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.calendar-day.has-session:hover {
    background: rgba(233, 69, 96, 0.5);
    transform: scale(1.1);
}

.calendar-day.has-session.selected {
    background: #e94560;
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.5);
}

.session-detail-panel {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.detail-panel-header {
    background: rgba(233, 69, 96, 0.1);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-panel-header h4 {
    color: #e94560;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #888;
    font-size: 0.85rem;
}

.detail-panel-content {
    padding: 1.5rem;
}

.detail-trophies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.detail-stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.detail-histogram {
    display: flex;
    flex-direction: column;
}

.detail-players-table h5,
.detail-histogram h5 {
    color: #e0e0e0;
    margin: 0;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.detail-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.view-toggle-small {
    transform: scale(0.85);
    transform-origin: right center;
}

.view-toggle-small .view-toggle-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.filter-label {
    color: #e94560;
    font-weight: normal;
    font-size: 0.85rem;
}

.clickable-stats tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-stats tbody tr:hover {
    background: rgba(233, 69, 96, 0.1);
}

.clickable-stats tbody tr.selected {
    background: rgba(233, 69, 96, 0.2);
}

.clickable-stats .player-name-cell {
    color: #e94560;
}

.calendar-histogram {
    min-height: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.histogram-bars {
    display: flex;
    align-items: stretch;
    gap: 3px;
    height: 220px;
    padding: 0 0.5rem;
    flex: 1;
}

.histogram-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.histogram-bar {
    width: 100%;
    background: rgba(233, 69, 96, 0.6);
    border-radius: 2px 2px 0 0;
    position: relative;
    min-height: 2px;
    transition: height 0.3s;
}

.histogram-bar.bar-nat-1 {
    background: #ff6b6b;
}

.histogram-bar.bar-nat-20 {
    background: #2d8659;
}

.bar-count {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #888;
}

.bar-label {
    font-size: 0.6rem;
    color: #666;
    margin-top: 4px;
}

body.light-theme .view-toggle-btn {
    color: #666;
}

body.light-theme .view-toggle-btn:hover {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

body.light-theme .view-toggle-btn.active {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
}

body.light-theme .calendar-month {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .calendar-month-header {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .calendar-day {
    color: #999;
}

body.light-theme .calendar-day.has-session {
    color: #fff;
}

body.light-theme .session-detail-panel {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .detail-panel-header {
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .detail-meta {
    color: #666;
}

body.light-theme .detail-players-table h5,
body.light-theme .detail-histogram h5 {
    color: #333;
}

.calendar-day.multi-session {
    position: relative;
}

.calendar-day .session-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e94560;
    color: #fff;
    font-size: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.session-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.session-picker {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 320px;
    width: 90%;
}

.session-picker h5 {
    color: #e94560;
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.session-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.session-picker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
    color: #e0e0e0;
}

.session-picker-item:hover {
    background: rgba(233, 69, 96, 0.2);
    border-color: rgba(233, 69, 96, 0.3);
}

.picker-name {
    font-weight: 500;
}

.picker-events {
    font-size: 0.8rem;
    color: #888;
}

body.light-theme .session-picker {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .session-picker-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

body.light-theme .session-picker-item:hover {
    background: rgba(233, 69, 96, 0.1);
}

@media (max-width: 768px) {
    .detail-stats-section {
        grid-template-columns: 1fr;
    }
    
    .calendar-months-grid {
        justify-content: center;
    }
    
    .section-header-actions {
        gap: 0.25rem;
    }
    
    .view-toggle-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}

.edit-sessions-page {
    max-width: 800px;
    margin: 0 auto;
}

.page-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.page-header-info h2 {
    color: #e0e0e0;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.page-subtitle {
    color: #888;
    font-size: 0.95rem;
}

.edit-sessions-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sessions-edit-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-edit-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.2s;
}

.session-edit-card:hover {
    border-color: rgba(233, 69, 96, 0.3);
}

.session-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.session-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e9456a;
}

.session-edit-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #888;
}

.session-edit-meta .session-events {
    color: #4caf50;
    font-weight: 500;
}

.session-edit-meta .session-date {
    color: #e0e0e0;
}

.session-edit-meta .session-time {
    color: #888;
}

.session-edit-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-input-label {
    color: #888;
    font-size: 0.9rem;
}

.session-name-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.session-name-input:focus {
    outline: none;
    border-color: #e9456a;
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.15);
}

.session-name-input::placeholder {
    color: #666;
}

.session-input-hint {
    color: #666;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

body.light-theme .page-header-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .page-header-info h2 {
    color: #333;
}

body.light-theme .session-edit-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .session-edit-card:hover {
    border-color: rgba(233, 69, 96, 0.4);
}

body.light-theme .session-edit-meta .session-date {
    color: #333;
}

body.light-theme .session-name-input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    color: #333;
}

body.light-theme .session-name-input:focus {
    border-color: #e9456a;
}

body.light-theme .session-name-input::placeholder {
    color: #999;
}

body.light-theme .form-actions {
    border-top-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .page-header-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .session-edit-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
        text-align: center;
    }
}
