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

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #1a1a1a;
}

*::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #333 #1a1a1a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
}

.prize-overlay-left {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.prize-overlay-right {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .prize-overlay-left,
    .prize-overlay-right {
        display: none;
    }
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #0f0f0f;
    border-bottom: 1px solid #333;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

.status-btn {
    background-color: #555;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.header-right {
    justify-self: end;
}

.main-nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #999;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.nav-link.active {
    color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.1);
}

.nav-link:hover {
    color: #8b5cf6;
}

.nav-icon {
    font-size: 1rem;
}

.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding-top: 50px;
}

.left-sidebar {
    width: 250px;
    background-color: #1a1a1a;
    border-right: 1px solid #333;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.hide-solved-toggle {
    margin-bottom: 1.5rem;
}

.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    cursor: pointer;
}

.toggle-switch {
    width: 40px;
    height: 20px;
    appearance: none;
    background-color: #333;
    position: relative;
    cursor: pointer;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #666;
    top: 2px;
    left: 2px;
    transition: all 0.2s;
}

.toggle-switch:checked {
    background-color: #8b5cf6;
}

.toggle-switch:checked::before {
    left: 22px;
    background-color: #ffffff;
}

.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #999;
    text-decoration: none;
}

.category-item:hover {
    background-color: #222;
    color: #ffffff;
}

.category-item.active {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.category-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.category-count {
    margin-left: auto;
    font-size: 0.85rem;
    opacity: 0.7;
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: #151515;
}

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

.challenge-card {
    background-color: #1f1f1f;
    border: 1px solid #333;
    padding: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.challenge-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

.challenge-card.solved {
    opacity: 0.5;
    background-color: #1a1a1a;
}

.challenge-card.solved:hover {
    opacity: 0.7;
    border-color: #10b981;
}

.challenge-card dotlottie-player,
.challenge-card dotlottie-wc {
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.challenge-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.challenge-title i {
    margin: 0 0.25rem;
}

.challenge-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.challenge-points {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.challenge-solves {
    font-size: 0.8rem;
    color: #999;
}

.challenge-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background-color: #333;
    color: #999;
}

.difficulty-yellow {
    color: #ffd700;
}

.difficulty-gray {
    color: #999;
}

.difficulty-red {
    color: #8b5cf6;
}

.right-sidebar {
    width: 350px;
    background-color: #1a1a1a;
    border-left: 1px solid #333;
    padding: 1.5rem;
    overflow-y: auto;
}

.user-profile {
    background-color: #1f1f1f;
    border: 1px solid #333;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar {
    margin-bottom: 1rem;
    position: relative;
}

.avatar-mask {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    border-radius: 50%;
    color: #ffffff;
    margin: 0 auto;
}

.avatar-mask img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.profile-avatar:hover .avatar-overlay {
    display: flex;
}

.profile-info {
    width: 100%;
}

.username {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.user-tag {
    display: inline-block;
    background-color: #8b5cf6;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #999;
}

.profile-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: #999;
    font-size: 0.9rem;
}

.announcements {
    background-color: #1f1f1f;
    border: 1px solid #333;
    overflow: hidden;
}

.announcement-tabs {
    display: flex;
    border-bottom: 1px solid #333;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.1);
    border-bottom: 2px solid #8b5cf6;
}

.tab-btn:hover {
    color: #8b5cf6;
}

.announcement-list {
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

#announcementList {
    min-height: 0;
}

#announcementList > div[style*="width: 8px"],
#announcementList > div[style*="height: 8px"],
#systemAnnouncementList > div[style*="width: 8px"],
#systemAnnouncementList > div[style*="height: 8px"],
#challengeAnnouncementList > div[style*="width: 8px"],
#challengeAnnouncementList > div[style*="height: 8px"],
#challengeAnnouncementList > div.announcement-item > div[style*="width: 8px"],
#challengeAnnouncementList > div.announcement-item > div[style*="height: 8px"],
#challengeAnnouncementList > div.announcement-item:has(> div[style*="width: 8px"]) {
    display: none !important;
}

#challengeAnnouncementList .announcement-item:empty {
    display: none !important;
}

#systemAnnouncementList,
#challengeAnnouncementList {
    min-height: 60px;
}

#systemAnnouncementList:empty::before,
#challengeAnnouncementList:empty::before {
    content: '';
    display: block;
}

.announcement-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding: 0.75rem 0;
}

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

#systemAnnouncementList .announcement-item,
#challengeAnnouncementList .announcement-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

#systemAnnouncementList .announcement-item:last-child,
#challengeAnnouncementList .announcement-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.announcement-icon {
    color: #8b5cf6;
    font-size: 1rem;
}

.announcement-content i {
    margin: 0 0.25rem;
}

.announcement-time {
    font-size: 0.75rem;
    color: #999;
}

.announcement-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.announcement-content {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.6;
}

.announcement-content p {
    margin-bottom: 0.5rem;
}

.announcement-content p:last-child {
    margin-bottom: 0;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    padding: 2rem;
}

.login-card {
    background-color: #1f1f1f;
    border: 1px solid #333;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #999;
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #151515;
    border: 1px solid #333;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #8b5cf6;
}

.form-input::placeholder {
    color: #666;
}

.form-message {
    display: none;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.form-message.success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.form-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.login-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #8b5cf6;
    color: #ffffff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background-color: #7c3aed;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.scoreboard-container {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: #151515;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.top-three-section {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.podium-card {
    background: linear-gradient(135deg, #2a1a3d 0%, #1a0f2e 100%);
    border: 2px solid #4a2a5a;
    padding: 2rem;
    text-align: center;
    position: relative;
    min-width: 200px;
    transition: transform 0.2s;
}

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

.podium-card.first-place {
    transform: scale(1.15);
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #2a1a3d 0%, #1a0f2e 100%);
    z-index: 10;
    margin-bottom: 1rem;
}

.podium-card.second-place {
    border-color: #6d4cd9;
    background: linear-gradient(135deg, #2a1a3d 0%, #1a0f2e 100%);
}

.podium-card.third-place {
    border-color: #5b3fb8;
    background: linear-gradient(135deg, #2a1a3d 0%, #1a0f2e 100%);
}

.profile-avatar {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.podium-info {
    color: #ffffff;
}

.podium-username {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.podium-country {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.podium-points {
    font-size: 1rem;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 0.5rem;
}

.podium-rank {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
}

.podium-rank sup {
    font-size: 1rem;
    vertical-align: super;
}

.crown-icon {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: #a78bfa;
    font-size: 2rem;
}

.leaderboard-table-section {
    background-color: #1f1f1f;
    border: 1px solid #333;
    padding: 1.5rem;
    overflow-x: auto;
}

.table-header-info {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: right;
}

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

.leaderboard-table thead {
    background-color: #0f0f0f;
}

.leaderboard-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid #333;
    color: #ccc;
}

.leaderboard-table tbody tr:hover {
    background-color: #252525;
}

.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.rank-badge.rank-gold {
    background-color: #8b5cf6;
    color: #fff;
}

.rank-badge.rank-silver {
    background-color: #6d4cd9;
    color: #fff;
}

.rank-badge.rank-bronze {
    background-color: #5b3fb8;
    color: #fff;
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-avatar-small {
    width: 32px;
    height: 32px;
    background-color: #333;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

.announcement-admin-item {
    padding: 1rem;
    border-bottom: 1px solid #333;
    margin-bottom: 0.5rem;
}

.announcement-admin-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

