:root {
    --pink: #ff79c6;
    --purple: #bd93f9;
    --blue: #8be9fd;
    --white: #f8f8f2;
    --dark-purple: #282a36;
    --light-purple: #44475a;
    --gold: #f1fa8c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-purple);
    color: var(--white);
    overflow-x: hidden;
    cursor: default;
}

#click-spark {
    position: fixed;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0L61.2 35.5H98L68.4 57.4L79.6 92.9L50 71L20.4 92.9L31.6 57.4L2 35.5H38.8L50 0Z' fill='%23f1fa8c'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform-origin: center;
    opacity: 0;
}

#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    background-size: cover;
}

#stars1 {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle fill="white" cx="10" cy="10" r="1"/><circle fill="white" cx="50" cy="70" r="0.5"/><circle fill="white" cx="80" cy="30" r="0.8"/></svg>');
    animation: animate-stars 50s linear infinite;
    z-index: -10;
}

#stars2 {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><circle fill="white" cx="30" cy="30" r="1.2"/><circle fill="white" cx="150" cy="120" r="0.9"/><circle fill="white" cx="90" cy="180" r="0.6"/></svg>');
    animation: animate-stars 100s linear infinite;
    z-index: -10;
}

#stars3 {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><circle fill="%238be9fd" cx="20" cy="250" r="1.5"/><circle fill="%23ff79c6" cx="250" cy="50" r="1.2"/><circle fill="%23bd93f9" cx="150" cy="150" r="1.8"/></svg>');
    animation: animate-stars 150s linear infinite;
    z-index: -10;
}

@keyframes animate-stars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-banner {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center 35%;
    border-bottom: 4px solid var(--pink);
}

h1 {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 3rem;
    color: var(--white);
    text-shadow: 
        0 0 5px var(--pink),
        0 0 10px var(--pink),
        0 0 15px var(--purple),
        0 0 20px var(--purple);
    margin-top: -70px;
    position: relative;
    z-index: 1;
}

.intro {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    text-align: center;
    padding: 0 1rem;
    font-size: 1.2rem;
    line-height: 1.6;
}

.content-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-title {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 2.5rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title::before,
.section-title::after {
    content: '';
    flex-grow: 1;
    background: linear-gradient(to right, transparent, var(--pink), transparent);
    height: 2px;
}

.section-title span {
    padding: 0 2rem;
}

.character-ranking {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.character-card {
    background: linear-gradient(145deg, var(--light-purple), #3a3d4d);
    border: 2px solid var(--purple);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
}

.character-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.character-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 15px var(--pink), 0 0 25px var(--blue);
}

.card-image-container {
    height: 200px;
    overflow: hidden;
    border-bottom: 2px solid var(--purple);
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.character-card:hover .card-image-container img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h2 {
    font-family: 'Mochiy Pop P One', sans-serif;
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.card-content p {
    line-height: 1.5;
    flex-grow: 1;
}

.couple-ranking {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.couple-card {
    background: var(--light-purple);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

.couple-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.couple-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 15px var(--blue);
    border-color: var(--blue);
}

.couple-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.couple-info {
    padding: 1rem;
}

.couple-info h3 {
    font-family: 'Mochiy Pop P One', sans-serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.couple-info p {
    color: var(--blue);
    font-style: italic;
}

footer {
    text-align: center;
    padding: 4rem 1rem 2rem 1rem;
    font-size: 1.3rem;
    font-family: 'Mochiy Pop P One', sans-serif;
    color: var(--pink);
    text-shadow: 0 0 5px var(--purple);
    margin-top: 3rem;
    position: relative;
}

.sakura-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.sakura {
    position: absolute;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25,0 C35,0 45,10 50,20 C40,25 40,35 35,40 C30,45 20,50 15,50 C10,45 5,35 0,25 C5,15 15,0 25,0 Z" fill="%23ff79c6" opacity="0.7"/></svg>');
    background-size: contain;
    width: 20px;
    height: 20px;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin-top: -50px;
    }
    .header-banner {
        height: 200px;
    }
    .character-ranking, .content-section, .couple-ranking {
        padding: 0 1rem;
    }

    .content-section {
        margin: 2rem auto;
    }

    .section-title {
        font-size: 2rem;
    }

     .couple-ranking {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .couple-card img {
        height: 120px;
    }
     .couple-info h3 {
        font-size: 1.1rem;
     }
      .couple-info p {
        font-size: 0.8rem;
     }
}