body {
    background: white;
    min-height: 100vh;
    margin: 0;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.container {
    width: 100vw;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.title {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-height: 3.5rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.title.reveal {
    display: flex;
    transform: translateY(60px);
    color: #ffd500;
    text-shadow: 
        2px 2px 0 rgba(0, 0, 0, 0.1),
        0 0 10px rgba(255, 213, 0, 0.3);
    font-size: 2rem;
}

.showcase {
    width: 65%;
    aspect-ratio: 1 / 1;
    border: 2px solid black;
    border-radius: 50%;
    margin-top: 7rem;
    margin-bottom: 3rem;
    background: white;
    position: relative;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    animation: none;
}

.showcase.reveal {
    border-radius: 15px;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.showcase.hover-active {
    transform: scale(1.05);
    animation: showcase-animation 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    animation-iteration-count: infinite;
    animation-direction: alternate;
    box-shadow: 0 0 20px rgba(255, 213, 0, 0.6);
}

@keyframes showcase-animation {
    0% {
        transform: scale(1.05);
        opacity: 0.2;
    }
    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.showcase .character-icon {
    width: 80%;
    height: 80%;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.showcase.hover-active .character-icon {
    opacity: 1;
}

.showcase.reveal .character-icon {
    opacity: 1;
    border-radius: 10px;
    width: 90%;
    height: 90%;
}

.showcase-text {
    position: absolute;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 1.4rem;
    color: #333;
    text-align: center;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    padding: 0;
    word-wrap: normal;
    line-height: 1.3;
    width: 400px;
    left: 50%;
    transform: translateX(-50%);
}

.showcase.hover-active .showcase-text {
    top: -90px;
    color: #ffd500;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    font-size: 1.4rem;
}

.showcase.reveal .showcase-text {
    display: none;
}

.select-button {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffd500;
    border: 2px solid black;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.select-button:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 0 black;
}

.select-button:active {
    transform: translateX(-50%) translateY(2px);
    box-shadow: none;
}

.description-container {
    width: 300px;
    background: white;
    border: 2px solid black;
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.description-container.reveal {
    opacity: 1;
    transform: translateY(-20px) scale(1);
    display: block;
}

.character-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    color: #ffd500;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.character-description {
    font-size: 0.7rem;
    line-height: 1.4;
    margin: 0;
    color: #333;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.character-info {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: bold;
    color: #000000;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.character-info:hover {
    background-color: #ffd500;
    color: black;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 213, 0, 0.5);
}

.stats-container {
    width: 300px;
    background: white;
    border: 2px solid black;
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.stats-container.reveal {
    opacity: 1;
    transform: translateY(-15px) scale(1);
    display: block;
}

.stat {
    margin-bottom: 0.75rem;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.stat-bar {
    width: 100%;
    height: 16px;
    background: #eee;
    border: 2px solid black;
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: #ffd500;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.grid {
    /* border: 2px solid black; */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5vw;
    width: auto;
    min-width: 450px;
    margin: 0 auto 50px auto;
    padding: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid.reveal {
    transform: translateY(20px);
}

.tile {
    min-width: 100px;
    max-width: 300px;
    aspect-ratio: 1 / 1;
    border: 2px solid black;
    border-radius: 12px;
    background: none;
    transition: box-shadow 0.1s, border 0.1s;
    box-sizing: border-box;
}

.tile.empty {
    border: none;
    background: transparent;
    pointer-events: none;
    box-shadow: none;
}

.tile:hover {
    box-shadow:
        0 0 0 4px #ffd50055,
        0 0 0 6px #ffd50033,
        0 0 0 8px #ffd50011;
    border: 2px solid #ffd500;
    cursor: pointer;
}

.go-button {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffd500;
    border: 2px solid black;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    display: none;
    z-index: 1001;
}

.go-button:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 0 black;
}

.go-button:active {
    transform: translateX(-50%) translateY(2px);
    box-shadow: none;
}

.bottom-go-button {
    position: relative;
    margin-bottom: 30px;
    text-align: center;
    z-index: 1000;
}

.back-link {
    display: inline-block;
    background: #ffd500;
    border: 2px solid black;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 0.7rem;
    text-decoration: none;
    color: black;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 0 black;
}

.back-link:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Page transition effects */
.page-transition-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@media (max-width: 1080px) {
    .grid {
        max-width: 70%;
    }
    .back-link {
        font-size: 1.5rem;
        padding: 10px 20px;
    }
}

@media (max-width: 1080px), (orientation: portrait) {
    .container {
        width: 100vw;
        max-width: none;
        padding: 0 12px;
        align-items: center;
    }
    .showcase {
        width: 75% !important;
        margin-top: 3rem;
        margin-bottom: 2rem;
    }
    .grid {
        width: 100% !important;
        min-width: 0;
        max-width: none;
        gap: 3vw;
        grid-template-columns: repeat(4, 1fr);
        margin: 0 auto 30px auto;
    }
    .tile {
        min-width: 0;
        max-width: none;
    }
    .showcase-text { width: auto; max-width: 90vw; margin-bottom: 20px;}
    .title { font-size: 1.5rem; }
    .go-button {
        bottom: -20px;
        font-size: 0.75rem;
    }
    .stats-container, .description-container { width: 80%; }
    .description-container { margin-top: 50px; }
    .back-link {font-size: 0.75rem; }
}