.page {
    margin: 0;
    padding: 8px;
    padding-top: 0;
    font-size: 90%;
}

.score-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.player-card {
    background-color: #eae7ff;
    border: solid 1px #dad7fb;
    border-radius: 3px;
    padding: 12px;
}

.player-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.player-avatar {
    width: 80px;
    height: 80px;
    border: solid 1px #dad7fb;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.player-info {
    flex: 1;
}

.player-name {
    color: #3843a6;
    font-size: 1.4em;
    font-weight: bold;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 335px;
    transition: color 0.15s;
}

.player-name:hover {
    text-decoration: underline;
}

.player-label {
    align-items: center;
    display: flex;
    gap: 8px;
}

.player-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.player-rank {
    color: #555;
}

.player-pp {
    color: #ff6db3;
    font-weight: bold;
}

.play-date {
    color: #777;
    font-size: 0.85em;
}

.beatmap-card {
    background-color: #eae7ff;
    border: solid 1px #dad7fb;
    border-radius: 3px;
    padding: 10px;
    padding-top: 12px;
}

.card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.beatmap-info {
    flex: 1;
}

.beatmap-title {
    color: #3843a6;
    font-size: 1.2em;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 3px;
}

.beatmap-title:hover {
    text-decoration: underline;
}

.beatmap-version {
    color: #555;
    font-size: 1em;
    font-weight: 500;
}

.beatmap-stars {
    color: #555;
    display: inline-flex;
    align-items: center;
    font-size: smaller;
    gap: 4px;
}

.beatmap-stars i {
    color: #979797;
    margin-right: -4px;
    margin-left: -1px;
    font-weight: 98%;
}

.beatmap-creator {
    color: #3843a6;
    text-decoration: none;
    font-size: 0.9em;
}

.beatmap-creator:hover {
    text-decoration: none;
    cursor: default;
}

.beatmap-creator span:hover {
    text-decoration: underline;
    cursor: pointer;
}

.beatmap-thumbnail img {
    object-fit: cover;
    height: 80px;
    border: 1px solid #ccc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.bottom-section {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px;
}

.bottom-section {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 8px;
}

.stats-panel {
    background-color: #eae7ff;
    border: solid 1px #dad7fb;
    border-radius: 3px;
    padding: 15px;
}

.stats-header {
    margin-bottom: 12px;
    text-align: center;
    border-bottom: solid 1px #dad7fb;
    padding-bottom: 8px;
}

.score-display {
    font-size: 1.4em;
}

.score-label {
    color: #555;
    margin-right: 4px;
    font-weight: bold;
}

.score-value {
    font-weight: bold;
    color: #3843a6;
}

.stats-grid {
    margin: 12px 0;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.stat-item {
    background-color: #f0ecfa;
    border: solid 1px #dad7fb;
    border-radius: 2px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hit-300 {
    border-left: 3px solid #66ccff;
}

.hit-100 {
    border-left: 3px solid #3be444;
}

.hit-50 {
    border-left: 3px solid #ffaa66;
}

.hit-miss {
    border-left: 3px solid #ff6666;
}

.hit-geki {
    border-left: 3px solid #e6c54d;
}

.hit-katu {
    border-left: 3px solid #ff88ff;
}

.hit-label {
    color: #777;
    font-size: 0.9em;
    font-weight: bold;
}

.hit-count {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.score-metadata {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 0;
    border-top: solid 1px #dad7fb;
    border-bottom: solid 1px #dad7fb;
}

.score-metadata.has-mods {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.metadata-item {
    text-align: center;
    background-color: #f0ecfa;
    padding: 8px;
    border-radius: 2px;
}

.metadata-item .label {
    display: block;
    color: #555;
    font-size: 0.8em;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.metadata-item .value {
    display: block;
    font-size: 1.6em;
    font-weight: bold;
    color: #3843a6;
}

.metadata-item.pp .value {
    color: #ff6db3;
}

.grade-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    background-color: #eae7ff;
    border: solid 1px #dad7fb;
    border-radius: 3px;
    padding: 15px;
}

.grade-wrapper {
    transition: transform 0.1s ease;
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.grade-wrapper:active {
    transform: scale(0.92);
}

.grade-image {
    width: 100%;
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: grade-glow 3s infinite ease-in-out;
}

@keyframes grade-glow {
    0% { filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.6)); }
    50% { filter: drop-shadow(0 0 15px rgb(250, 255, 255)); }
    100% { filter: drop-shadow(0 0 5px rgba(150, 150, 150, 0.6)); }
}

.score-buttons {
    width: 90%;
    display: flex;
    flex-direction: column;
    margin-top: 12px;
    gap: 8px;
}

.score-button {
    display: block;
    width: 100%;
    padding: 8px 0;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    box-sizing: border-box;
    transition: all 0.1s;
    color: rgb(236, 236, 236) !important;
    border: none;
}

.score-button:active {
    transform: translateY(1px);
}

.score-button.primary {
    background: -webkit-linear-gradient(rgb(123, 114, 207) 0%, rgb(91, 83, 153) 100%);
    background-image: linear-gradient(rgb(123, 114, 207) 0%, rgb(91, 83, 153) 100%);
}

.score-button.primary:hover {
    text-shadow: 2px 1px 8px #b7befd;
    background-image: linear-gradient(rgb(83, 147, 207) 0%, rgb(58, 109, 156) 100%);
    text-decoration: none;
    color: rgb(236, 236, 236);
}

.score-button.secondary {
    background: -webkit-linear-gradient(rgb(170, 170, 170) 0%, rgb(100, 100, 100) 100%);
    background-image: linear-gradient(rgb(170, 170, 170) 0%, rgb(100, 100, 100) 100%);
}

.score-button.secondary:hover {
    text-shadow: 2px 1px 8px #b7befd;
    background: -webkit-linear-gradient(rgb(190, 190, 190) 0%, rgb(120, 120, 120) 100%);
    background-image: linear-gradient(rgb(190, 190, 190) 0%, rgb(120, 120, 120) 100%);
    text-decoration: none;
    color: rgb(236, 236, 236);
}
