@font-face {
  font-family: "SkimisherCondensed";
  src: url(fonts/SkirmisherCondensed-1jj3B.otf);
}

/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: url('images/background.jpg') no-repeat center center fixed;
    background-size: cover !important;
    transition: background 1s ease-in-out;
    overflow: overlay;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(
        -20deg,
        transparent 45%, 
        rgba(224, 231, 34, .2) 45%, 
        rgba(224, 231, 34, .2) 48%, 
        transparent 48%, 
        transparent 50%, 
        rgba(224, 231, 34, .2) 50%, 
        rgba(224, 231, 34, .2) 55%, 
        transparent 55%, 
        transparent 57%, 
        rgba(224, 231, 34, .2) 57%, 
        rgba(224, 231, 34, .2) 59%, 
        transparent 59%
    ) no-repeat center center fixed, linear-gradient(to right, rgba(15, 32, 39, 0.8), rgba(32, 58, 67, 0.7), rgba(44, 83, 100, 0.8));
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: hidden;
}

body:has(#angel-image[alt="Alice Liddell"]) {
    filter: blur(1px) brightness(0.9) sepia(0.5) contrast(0.5);
    backdrop-filter: blur(1px) brightness(0.9) sepia(0.5) contrast(0.5);
    animation: flashAlice .5s ease-in-out;
}

body:has(#angel-image[alt="Alice Liddell"]):before{
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: radial-gradient(transparent 70%, black);
    z-index: 5;
    pointer-events: none;
}
body:has(#angel-image[alt="Alice Liddell"]):after{
    content:"";
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/7/76/1k_Dissolve_Noise_Texture.png");
    height: 300%;
    width: 300%;
    position: fixed;
    opacity:0.1;
    animation: animateGrain 8s steps(10) infinite;
    pointer-events: none;
}

@keyframes animateGrain{
  0%, 100% { transform:translate(0, 0) }
  10%{
    transform:translate(-5%,-10%)
  }
  20%{
    transform:translate(-15%,-20%)
  }
  30%{
    transform:translate(-5%,-10%)
  }
  40%{
    transform:translate(-15%,-20%)
  }
  
  50%{
    transform:translate(-5%,-10%)
  }
  60%{
    transform:translate(-15%,-20%)
  }
  70%{
    transform:translate(-5%,-10%)
  }
  80%{
    transform:translate(-15%,-20%)
  }
  90%{
    transform:translate(-5%,-10%)
  }
  100%{
    transform:translate(-15%,-20%)
  }
 
}

@keyframes flashAlice {
    0% { filter: blur(0px) brightness(0.9) sepia(0) contrast(1); }
    10% { filter: blur(5px) brightness(2) sepia(1) contrast(1.5); }
    100% { filter: blur(1px) brightness(0.9) sepia(0.5) contrast(0.5); }
}

#knuckles-title {
    display: none;
}

body:has(#angel-image[alt="Knuckles the Echidna"]) #knuckles-title {
    display: block;
    background-image: url(images/knuckles_title.png);
    height: 75px;
    aspect-ratio: 5 / 1;
    position: absolute;
    opacity: 1;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    top: 85px;
    z-index: 100;
}

header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in;
    border-bottom: 5px solid #e0e722;
    position: relative;
    perspective: 300px;
    overflow: hidden;
}

header h1 {
    font-size: 4em;
    font-family: 'SkimisherCondensed', sans-serif;
    color: #e0e722;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5), 0 0 20px #e0e722, 0 0 30px #e0e722, 0 0 40px #e0e722, 0 0 50px #e0e722;
    transform: rotateX(30deg) scale(1.5);
    width: auto;
    margin: auto;
    position: relative;
}

header::before, header::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

header::before {
    left: 0;
    transform: skewX(-5deg);
}

header::after {
    right: 0;
    transform: skewX(5deg);
}

.container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    flex: 1;
    animation: slideIn .7s ease-out;
    gap: 20px;
    perspective: 3000px;
    max-height: 82vh;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.sidebar {
    background: rgba(44, 62, 80, 0.9);
    padding: 20px;
    width: 250px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    animation: fadeInLeft .7s ease-in;
    transform: rotateY(30deg) rotateX(5deg) scale(1.1);
    z-index: 10;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: rotateY(90deg) rotateX(0deg) scale(1.1) translateX(-20px); }
    to { opacity: 1; transform: rotateY(30deg) rotateX(5deg) scale(1.1) translateX(0); }
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    display: block;
    padding: 10px;
    transition: background 0.3s, color 0.3s;
    position: relative;
    overflow: hidden;
}

.sidebar nav ul li a:hover {
    background: #e0e722;
    color: #2c3e50;
    border-radius: 5px;
    text-shadow: 1px 1px #000;
}

.sidebar nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.sidebar nav ul li a:hover::before {
    left: 0;
}

.sidebar-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 20px;
}

.sidebar-logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    border-radius: 10px;
    border: 2px solid #e0e722;
}

#content {
    padding: 20px;
    background: rgba(30, 30, 30, 0.6);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #e0e722;
    flex-grow: 1;
    overflow-y: auto;
    width: 100%;
    max-width: 900px;
    margin-left: 20px;
    animation: fadeInRight 1s ease-in;
    max-height: 78vh;
    overflow-y: auto;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

section h2 {
    font-size: 2.5em;
    color: #e0e722;
    font-family: 'Raleway', sans-serif;
    text-shadow: 1px 1px #000;
    border-bottom: 2px solid #e0e722;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

footer {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 15px;
    width: 100%;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-in;
    position: fixed;
    bottom: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

button {
    background: #e0e722;
    border: none;
    color: #333;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 18px;
    margin: 10px;
    cursor: pointer;
    border-radius: 16px;
    transition: background-color 0.3s, transform 0.3s;
}

button:hover {
    background-color: #f9ca24;
    transform: scale(1.025);
}

.gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: center;
    flex-direction: row;
}

.gallery-column {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
    width: calc(33.333% - 10px);
    gap: 15px;
}

.gallery img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.angel, .event, article, .about-block {
    border: 2px solid #2c3e50;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    background-color: #fefefe;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.angel img, .event img {
    width: 100%;
    border-radius: 8px;
}

.angel:hover, .event:hover, article:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.angel h3, .event h3, article h3, .about-block h3 {
    margin-top: 10px;
    font-size: 2em;
    color: #2c3e50;
    font-family: 'Poppins', sans-serif;
    border-bottom: 2px solid #e0e722;
    display: inline-block;
    padding-bottom: 5px;
}

.angel p, .event p, article p, .about-block p {
    margin-top: 10px;
    font-size: 1em;
    color: #7f8c8d;
}

form {
    display: flex;
    flex-direction: column;
}

form label {
    margin: 10px 0 5px;
}

form input, form textarea {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form button {
    padding: 10px 20px;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #f9ca24;
    color: #333;
}

/* Home Section */
#home {
    background: linear-gradient(to right, rgba(44, 62, 80, 1) 10%, transparent), url(images/complex.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 40px; /* Increased padding */
    border-radius: 15px; /* Softer border radius */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Stronger shadow */
    text-align: center; /* Center align text */
    animation: fadeIn 1s ease-in;
    max-width: 900px; /* Constrain width for better layout */
}

#home h2 {
    font-size: 3em; /* Increased font size */
    color: #e0e722;
    font-family: 'Raleway', sans-serif;
    text-shadow: 2px 2px #000; /* Stronger text shadow */
    border-bottom: 2px solid #e0e722;
    display: inline-block;
    padding-bottom: 10px; /* Increased padding */
    margin-bottom: 30px; /* Increased margin */
}

#home .letter-border {
    text-align: left;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #333;
    border-radius: 5px;
    padding: 20px;
    background: repeating-linear-gradient(130deg, whitesmoke 0px, whitesmoke 25px, #2c3e50 25px, #2C3E50 50px, whitesmoke 50px, whitesmoke 75px, #d4af37 75px, #d4af37 100px);
    box-shadow: 0 15px 15px -5px black;
    position: relative;
}

#home p {
    line-height: 1.6;
    font-size: 1em;
    padding: 40px 40px 60px;
    border-radius: 5px;
    text-align: justify;
    hyphens: auto;
    background: rgba(245, 245, 245, .85);
    position: relative;
}

#home .letter-border::before {
    content: "";
    border-radius: 5px;
    background: url(images/logo.jpg) no-repeat center center, whitesmoke;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 50%;
    margin: 20px;
}

#home button {
    color: #333;
}

#home img {
    width: 100%;
    max-width: 800px; /* Set a max-width for the image */
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Stronger shadow */
    transition: transform 0.3s, box-shadow 0.3s;
}

#home img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4); /* Stronger hover effect */
}

/* Character Selection Section */
.character-selection {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.8);
    color: #e0e722;
    user-drag: none;
    user-select: none;
}

.character-selection h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px #000;
}

.character-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px; /* Reduced margin for a tighter layout */
    user-drag: none;
    user-select: none;
}

.character-card {
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    width: 100px;
    height: 50px;
    overflow: hidden;
    transform: skewX(350deg);
    margin-bottom: 10px;
    border-inline: solid 5px rgba(44, 62, 80, 0.9);
    user-drag: none;
    user-select: none;
}

.character-card img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.1s, box-shadow 0.1s;
    transform: skewX(10deg) scale(1.5) !important;
    margin-top: 15px;
    user-drag: none;
    user-select: none;
}

.character-card.highlight,
.character-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border: none;
}

.character-card.highlight img,
.character-card:hover img {
    filter: brightness(2);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

@keyframes flash {
    0% { background-color: rgba(255, 255, 255, 0.1); filter: brightness(1); }
    10% { background-color: rgba(255, 255, 255, 0.9); filter: brightness(2); }
    100% { background-color: rgba(255, 255, 255, 0.1); filter: brightness(2); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

.angel-details {
    padding: 20px;
    background: rgba(44, 62, 80, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    user-drag: none;
    user-select: none;
}

.angel-details .details-block {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    position: relative;
}

.angel-details .censorship {
    position: absolute;
    right: 0;
    top: 0;
}

.angel-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
}

.angel-tags .tag {
    padding: 5px 10px;
    border-radius: 10px;
    background: #e0e722;
    color: #222;
}

.flash {
    animation: flash 300ms, shake 100ms;
}

.shake {
    animation: shake 100ms;
}

.swap-image-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.3s, color 0.3s;
    position: absolute;
    bottom: 5px;
    right: 0;
    width: 55px;
    height: 55px;
    justify-content: center;
    align-items: center;
    user-drag: none;
    user-select: none;
}

.swap-image-button:hover {
    color: black;
    transform: scale(1.1);
}

.angel-details-image {
    height: 30vh; /* Fixed size for larger display */
    max-height: 60vw;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    user-drag: none;
    user-select: none;
}

.angel-details-info {
    text-align: left;
    color: #fff;
    user-drag: none;
    user-select: none;
    overflow: hidden;
}

.angel-details-info h1 {
    font-size: 5em;
    font-family: 'SkimisherCondensed', sans-serif;
    color: #e0e722;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5), 0 0 20px #e0e722, 0 0 30px #e0e722, 0 0 40px #e0e722, 0 0 50px #e0e722;
    animation: textGlow 2s infinite alternate;
    user-drag: none;
    user-select: none;
}

.angel-details-info h3 {
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 1px 1px #000;
    user-drag: none;
    user-select: none;
}

.angel-details-info p {
    font-size: 1.2em;
    margin-bottom: 5px;
    user-drag: none;
    user-select: none;
}

.theme-btn span {
    display: block;
}

.theme-btn i {
    display: none;
}

.snd-button-group {
    display: flex;
}

@media (max-width: 1050px) {
    .angel-details .details-block {
        flex-direction: column;
    }
    
    .theme-btn span {
        display: none;
    }
    
    .theme-btn i {
        display: block;
    }
    
    .snd-button-group button {
        margin: 0;
        border-radius: 0;
    }
    
    .snd-button-group button:first-child {
        border-radius: 16px 0 0 16px;
    }
    
    .snd-button-group button:last-child {
        border-radius: 0 16px 16px 0;
    }
}

@media (min-width: 768px) and (max-height: 920px) {
    .sidebar-logo {
        display: none;
    }
}

@media (min-width: 768px) and (max-height: 740px) {
    .sidebar-footer {
        display: none;
    }
}

@media (max-width: 768px), (max-height: 620px) {
    body {
        overflow-y: auto;
    }
    
    .sidebar-footer {
        display: block;
    }
    
    .sidebar-logo {
        display: block;
    }
    
    header h1 {
        display: flex;
        flex-direction: column;
    }

    .container {
        flex-direction: column;
        align-items: center;
        height: auto;
        transform: none;
        max-height: none;
        margin-bottom: 50px;
    }

    .sidebar {
        width: 100%;
        transform: none;
    }

    main#content {
        margin-left: 0;
        max-height: none;
        overflow-y: hidden;
    }
}

@media (max-width: 480px) {
    .gallery img {
        width: 100%;
    }
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    width: 100%;
    height: 1.5em; /* Adjust as necessary */
}

.marquee {
    display: inline-block;
    animation: marquee 10s linear infinite;
    font-size: 1.2em;
    color: #e0e722;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Style the scrollbar */
main::-webkit-scrollbar {
    width: 8px;
}

main::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

main::-webkit-scrollbar-thumb {
    background: #e0e722;
    border-radius: 10px;
}

main::-webkit-scrollbar-thumb:hover {
    background: #e0e722;
}

.dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2c3e50;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.dialog h2 {
    color: #e0e722;
    font-family: 'Poppins', sans-serif;
    text-shadow: 1px 1px #000;
    margin-bottom: 10px;
}

.dialog ul {
    list-style: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.dialog li {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.dialog li:hover {
    background: #e0e722;
    color: #2c3e50;
}

.dialog p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #7f8c8d;
}

.dialog button {
    background: #e0e722;
    border: none;
    color: #333;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.dialog button:hover {
    background: #f9ca24;
}

/* Style the scrollbar */
ul::-webkit-scrollbar {
    width: 8px;
}

ul::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

ul::-webkit-scrollbar-thumb {
    background: #e0e722;
    border-radius: 10px;
}

ul::-webkit-scrollbar-thumb:hover {
    background: #e0e722;
}

.aligate-data {
    background: rgba(44, 62, 80, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

.aligate-data h2 {
    color: #e0e722;
    font-family: 'Poppins', sans-serif;
    text-shadow: 1px 1px #000;
    margin-bottom: 20px;
}

.practice-tabs, .difficulty-tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 18px;
}

.tab-link {
    background: none;
    border: none;
    color: #e0e722;
    font-size: 1em;
    cursor: pointer;
    transition: color 0.3s;
    margin: 0;
}

.tab-link:hover {
    color: white;
}

.tab-link.active {
    color: #333;
    background-color: white;
    text-decoration: underline;
}

.tab-link.disabled {
    color: gray;
    cursor: not-allowed;
    background: none;
}

.tab-link.disabled:hover {
    background: none;
}

.practice-content.active, .difficulty-mode-content.active {
    display: block;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-top: 10px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.difficulty-mode-content {
    background: rgba(30, 30, 30, 0.6);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.difficulty-mode-content .no-data {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    font-size: 1.5em;
    color: #e0e722;
}

.ranking {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: white;
}

.rank-star {
    font-size: 0;
}

.ranking.FAILURE {
    color: transparent;
    font-size: 0;
}

.ranking.FAILURE .rank {
    color: white;
}

.ranking.F .rank {
    color: midnightblue;
}

.ranking.E .rank {
    color: dodgerblue;
}

.ranking.D .rank {
    color: green;
}

.ranking.C .rank {
    color: yellow;
}

.ranking.B .rank {
    color: orangered;
}

.ranking.A .rank {
    color: red;
}

.ranking.One .rank-star,
.ranking.Two .rank-star,
.ranking.Three .rank-star {
    color: goldenrod;
}

.ranking.One .rank,
.ranking.Two .rank,
.ranking.Three .rank {
    font-size: 0;
}

.ranking.One .rank-star i:nth-of-type(1) {
    font-size: 4rem;
    text-shadow: white 1px 1px 0, white -1px -1px 0, white 1px -1px 0, white -1px 1px 0;
}

.ranking.Two .rank-star i:nth-of-type(1) {
    margin-right: -15px;
}

.ranking.Two .rank-star i:nth-of-type(1),
.ranking.Two .rank-star i:nth-of-type(2) {
    font-size: 3rem;
    text-shadow: white 1px 1px 0, white -1px -1px 0, white 1px -1px 0, white -1px 1px 0;
}

.ranking.Three .rank-star i:nth-of-type(1),
.ranking.Three .rank-star i:nth-of-type(2) {
    margin-right: -15px;
}

.ranking.Three .rank-star i:nth-of-type(1),
.ranking.Three .rank-star i:nth-of-type(2),
.ranking.Three .rank-star i:nth-of-type(3) {
    font-size: 2.5rem;
    text-shadow: white 1px 1px 0, white -1px -1px 0, white 1px -1px 0, white -1px 1px 0;  
}

.ranking.P {
    color: gold;
}

.ranking .rank {
    font-size: 4rem;
    text-shadow: white 1px 1px 0, white -1px -1px 0, white 1px -1px 0, white -1px 1px 0;
}

.achievements h3 {
    margin-block: 20px;
}

.achievements p {
    background: rgba(30, 30, 30, 0.6);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.best {
    color: gold;
    font-weight: bold;
    margin-left: 5px;
}

.image-dialog {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.dialog-image {
    max-width: 90%;
    max-height: 90%;
}

.close-dialog {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-dialog:hover,
.close-dialog:focus {
    color: #999;
    text-decoration: none;
    cursor: pointer;
}

.spinning {
    animation: spin .1s linear infinite;
    filter: blur(2px);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#play-pause-dialog {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
}

#play-pause-dialog:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.cd-image {
    -webkit-mask: url(images/cd.png) 0 / 100% 100%;
    mask: url(images/cd.png) 0 / 100% 100%;
    aspect-ratio: 1 / 1;
    background-repeat: no-repeat;
    background-size: cover;
}

#play-pause-dialog {
    display: none;
    width: 50px;
    aspect-ratio: 1 / 1;
}

#image-dialog:has(.cd-image) #play-pause-dialog {
    display: block;    
}

#side-image {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -5;
    height: 100%;
    transform: translate(85%, 32px);
    transition: transform .3s ease-in-out, opacity .3s ease-in-out;
    opacity: 1;
    filter: drop-shadow(-5px 0px 0px rgba(255, 255, 255, 1)) drop-shadow(-5px 0px 0px rgba(255, 255, 255, 0.5));
    mask-image: url(images/alice_side_o.png);
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: bottom;
    background-image: url(images/fire.gif);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    object-position: bottom;
}

#side-image-o {
    position: absolute;
    right: 30px;
    top: 0;
    bottom: 0;
    z-index: -6;
    height: 100%;
    transform: translate(85%, 32px);
    transition: transform .3s ease-in-out, opacity .3s ease-in-out, right .2s ease-in-out;
    opacity: 1;
    -webkit-mask-image: url(images/alice_side_o.png);
    mask-image: url(images/alice_side_o.png);
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: bottom;
    background-image: url(images/fire.gif);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    object-position: bottom;
}

#side-image-o[src=""] {
    transform: translate(85%, 32px);
    opacity: 0;
    right: 0;
}

#side-image:not([src]), #side-image[src*="object"], #side-image[src*="null"], #side-image[src=""] {
    transform: translate(1000px, 32px);
    opacity: 0;
}

.guess-game #side-image {
    opacity: 0;
}

.guess-game.reveal #side-image {
    opacity: 1;
}

.guess-game:not(.reveal) .character-card.highlight,
.guess-game:not(.reveal) .character-card:hover {
    box-shadow: none;
    border-inline: solid 5px rgba(44, 62, 80, 0.9);
}

.guess-game:not(.reveal) .character-card.highlight img,
.guess-game:not(.reveal) .character-card:hover img {
    filter: none;
    box-shadow: none;
}

.guess-game:not(.reveal) #angel-details {
    opacity: 0;
}

#guess-game-btn {
    content: "Guess who?";
}

.guess-game #guess-game-btn {
    content: "End game";
}

#guess-game-reveal {
    display: none;
}

.guess-game #guess-game-reveal {
    display: flex;
}

@media (max-width: 1720px) {
    #side-image, #side-image-o, #guess-game-btn, #angel-logo, body:has(#angel-image[alt="Alice Liddell"]):before, body:has(#angel-image[alt="Alice Liddell"]):after {
        display: none !important;
    }
    
    body:has(#angel-image[alt="Alice Liddell"]) {
        filter: unset;
        backdrop-filter: unset;
        animation: none;
    }
}

#angel-image.glitch {
    animation: glitchA 3s linear infinite;
}

#side-image.glitch {
    animation: glitchB 3s linear infinite;
}

@keyframes glitchA {
    0% { content: url(images/charon.jpg); }
    80% { content: url(images/charon.gif); }
    100% { content: url(images/charon.jpg); }
}

@keyframes glitchB {
    0% { content: url(images/charon_side.png); }
    80% { content: url(images/charon_side.gif); }
    100% { content: url(images/charon_side.png); }
}

.theme-btn, .theme-btn span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
