/* Leaderboard styles for Crypto Snake Game */

.leaderboard-container {
    background-color: var(--primary-black, #1a1a1a);
    border: 5px solid var(--primary-black, #1a1a1a);
    border-radius: 10px;
    padding: 20px;
    margin-top: 40px;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

.leaderboard-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.leaderboard-header {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    text-align: center;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

.leaderboard-tab {
    font-family: 'Bangers', cursive;
    background-color: var(--primary-blue, #3a86ff);
    color: white;
    border: 3px solid var(--primary-black, #1a1a1a);
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 3px 3px 0px var(--primary-black, #1a1a1a);
    letter-spacing: 1px;
}

.leaderboard-tab:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0px var(--primary-black, #1a1a1a);
}

.leaderboard-tab.active {
    background-color: var(--primary-yellow, #ffde00);
    color: var(--primary-black, #1a1a1a);
}

.weekly-timer {
    background-color: rgba(255, 222, 0, 0.1);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.weekly-timer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    color: white;
}

.weekly-timer .timer {
    font-weight: bold;
    color: var(--primary-yellow, #ffde00);
    font-size: 18px;
}

.leaderboard-content {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    padding: 10px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Open Sans', sans-serif;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 10px;
    text-align: left;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table th {
    font-weight: bold;
    color: var(--primary-yellow, #ffde00);
    text-transform: uppercase;
    font-size: 14px;
}

.leaderboard-table tr.top-score td {
    color: var(--primary-yellow, #ffde00);
    font-weight: bold;
}

.leaderboard-table tr.top-score:nth-child(1) td {
    font-size: 18px;
}

.leaderboard-table .no-scores {
    text-align: center;
    padding: 30px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
}

.check-in-button {
    display: block;
    margin: 0 auto;
    font-family: 'Bangers', cursive;
    background-color: var(--primary-yellow, #ffde00);
    color: var(--primary-black, #1a1a1a);
    border: 3px solid var(--primary-black, #1a1a1a);
    border-radius: 5px;
    padding: 12px 30px;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0px var(--primary-black, #1a1a1a);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    z-index: 1;
}

.check-in-button:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--primary-black, #1a1a1a);
}

.check-in-button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.7;
}

.check-in-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
    transform: skewX(-30deg);
    z-index: -1;
}

.check-in-button:hover:not(:disabled)::before {
    left: 100%;
}

/* Check-in notification */
.check-in-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary-yellow, #ffde00);
    border: 3px solid var(--primary-black, #1a1a1a);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 5px 5px 0px var(--primary-black, #1a1a1a);
    z-index: 1000;
    animation: slide-in 0.5s forwards;
    font-family: 'Bangers', cursive;
}

@keyframes slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.check-in-notification.fade-out {
    animation: fade-out 0.5s forwards;
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.notification-content h3 {
    margin: 0 0 10px 0;
    color: var(--primary-black, #1a1a1a);
    font-size: 24px;
}

.notification-content p {
    margin: 0;
    color: var(--primary-black, #1a1a1a);
    font-family: 'Open Sans', sans-serif;
    font-weight: bold;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .leaderboard-container {
        padding: 15px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px 5px;
        font-size: 14px;
    }
    
    .leaderboard-tab {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .check-in-button {
        font-size: 18px;
        padding: 10px 20px;
    }
}

/* Portrait mode optimization */
@media screen and (max-width: 600px) and (orientation: portrait) {
    .leaderboard-container {
        padding: 10px;
        margin-top: 20px;
    }
    
    .leaderboard-content {
        max-height: 300px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 6px 3px;
        font-size: 12px;
    }
    
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4) {
        display: none; /* Hide date column on small screens */
    }
    
    .weekly-timer-content {
        flex-direction: column;
        gap: 5px;
    }
}

/* Minting notification styles */
.minting-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-blue, #3a86ff);
    border: 3px solid var(--primary-black, #1a1a1a);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 5px 5px 0px var(--primary-black, #1a1a1a);
    z-index: 2000;
    font-family: 'Bangers', cursive;
    text-align: center;
    min-width: 300px;
}

.minting-notification.success {
    background-color: #4CAF50;
}

.minting-notification.error {
    background-color: #F44336;
}

.minting-notification .notification-content h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 28px;
    text-shadow: 2px 2px 0px var(--primary-black, #1a1a1a);
}

.minting-notification .notification-content p {
    margin: 0 0 15px 0;
    color: white;
    font-family: 'Open Sans', sans-serif;
    font-weight: bold;
}

.minting-notification .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-top: 10px;
}

.minting-notification.fade-out {
    animation: fade-out 0.5s forwards;
}