@import url('theme.css');

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    align-items: stretch;
}

.stats-item {
    background: #000;
    border: 2px solid var(--neon-cyan);
    padding: var(--spacing-sm);
    box-shadow: 4px 4px 0px rgba(0, 255, 255, 0.2);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 64px;
}

.stats-item:hover {
    box-shadow: 6px 6px 0px rgba(0, 255, 255, 0.4);
}

.stats-label {
    color: var(--retro-text-dim);
    font-size: 10px;
    margin-bottom: 4px;
}

.stats-value {
    color: var(--neon-yellow);
    text-shadow: 2px 2px 0px #000;
}

.dual-modal {
    align-items: center;
    padding: var(--spacing-md);
}

.dual-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
    width: 100%;
}

.dual-wrapper .modal-content {
    width: min(520px, 45vw);
}

.stats-modal-card {
    border: 4px solid var(--neon-cyan);
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.8), inset 0 0 16px rgba(0, 255, 255, 0.35);
}

.stats-modal-card .modal-header {
    border-color: var(--neon-cyan);
}

.stats-modal-card h2 {
    color: var(--neon-cyan);
}

.dual-wrapper .modal-content h2 {
    margin: 0;
}

.dual-wrapper .modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

@media (max-width: 720px) {
    .dual-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .dual-wrapper .modal-content {
        width: 100%;
    }

    .achievements-scroll {
        max-height: 300px;
    }
}

.achievements-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-sm);
    border-top: 2px dashed var(--neon-pink);
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    padding-top: 2px;
}

.achievements-header h3 {
    font-size: 14px;
    color: var(--neon-yellow);
    margin: 0;
    text-transform: uppercase;
}

.achievements-hint {
    font-size: 9px;
    color: var(--retro-text-dim);
}

.achievements-tracker {
    font-size: 11px;
    color: var(--neon-cyan);
    text-shadow: 1px 1px 0 #000;
    white-space: nowrap;
    margin-left: auto;
    line-height: 1.4;
    padding-top: 1px;
}

.achievements-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.achievements-scroll::-webkit-scrollbar {
    width: 12px;
    background: #000;
    border-left: 2px solid var(--neon-pink);
}

.achievements-scroll::-webkit-scrollbar-thumb {
    background: var(--neon-pink);
    border: 2px solid #000;
}

.achievements-scroll::-webkit-scrollbar-thumb:hover {
    background: #ff66ff;
}

.achievements-grouped {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.achievement-group {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--retro-text-dim);
    padding: var(--spacing-sm);
}

.achievement-group-title {
    font-size: 11px;
    color: var(--neon-pink);
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: var(--spacing-sm);
    justify-items: center;
}

.achievement-card {
    position: relative;
    width: 64px;
    height: 64px;
    background: #000 url('assets/the-source.png') center/contain no-repeat;
    border: 2px solid var(--retro-text-dim);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.15);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, filter 0.2s, opacity 0.2s;
    overflow: visible;
    cursor: var(--cursor-pointer);
    display: flex;
    justify-content: center;
    align-items: center;
}

.achievement-card.unlocked {
    border-color: var(--neon-green);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
    filter: none;
    opacity: 1;
}

.achievement-card.locked {
    filter: grayscale(100%);
    opacity: 0.45;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.5);
}

.achievement-card::after {
    content: '';
    position: absolute;
    top: 50%;
    right: calc(100% + 8px);
    transform: translateY(-50%);
    width: 200px;
    min-height: 78px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.achievement-card:hover::after {
    opacity: 1;
}

.achievement-card .achievement-name,
.achievement-card .achievement-desc,
.achievement-card .achievement-status {
    position: absolute;
    color: var(--neon-yellow);
    font-size: 9px;
    line-height: 1.2;
    padding: 0;
    text-align: left;
    opacity: 0;
    transition: opacity 0.2s;
    width: 200px;
    right: calc(100% + 8px);
    pointer-events: none;
    text-shadow: 1px 1px 0 #000;
}

.achievement-card:hover .achievement-name,
.achievement-card:hover .achievement-desc,
.achievement-card:hover .achievement-status {
    opacity: 0; /* hide inline text, use global tooltip instead */
}

.achievement-card .achievement-name {
    font-weight: bold;
    color: var(--neon-cyan);
    top: calc(50% - 28px);
}

.achievement-card .achievement-desc {
    color: var(--retro-text-dim);
    top: 50%;
}

.achievement-card .achievement-status {
    color: var(--neon-green);
    text-transform: uppercase;
    top: calc(50% + 24px);
}

.achievement-hover-tooltip {
    position: fixed;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.4);
    padding: 8px 10px;
    font-size: 10px;
    line-height: 1.4;
    color: var(--neon-yellow);
    max-width: 220px;
    display: none;
    pointer-events: none;
}

.achievement-hover-tooltip .tooltip-name {
    color: var(--neon-cyan);
    font-weight: bold;
    margin-bottom: 4px;
}

.achievement-hover-tooltip .tooltip-desc {
    color: var(--retro-text-dim);
    margin-bottom: 6px;
}

.achievement-hover-tooltip .tooltip-status {
    color: var(--neon-green);
    text-transform: uppercase;
}
.achievement-name {
    color: var(--neon-yellow);
    font-size: 11px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.achievement-desc {
    color: var(--retro-text-dim);
    font-size: 9px;
    margin-bottom: 6px;
}

.achievement-status {
    color: var(--neon-cyan);
    font-size: 10px;
    text-transform: uppercase;
}

.achievements-section::-webkit-scrollbar {
    width: 12px;
    background: #000;
    border-left: 2px solid var(--neon-pink);
}

.achievements-section::-webkit-scrollbar-thumb {
    background: var(--neon-pink);
    border: 2px solid #000;
}

.achievements-section::-webkit-scrollbar-thumb:hover {
    background: #ff66ff;
}
