@font-face {
    font-family: 'ourple';
    src: url('../fonts/ourple.ttf') format('truetype');
}

html {
    cursor: url("../img/cursors/ourple-cursor.png"), auto;
}

body {
    background: url("../img/bg.png") no-repeat fixed center/cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 100px;
    padding: 10px;
    padding-top: 25px;
    box-sizing: border-box;
}

.lettabox-down-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 85px;
    pointer-events: none;
    z-index: 1000;
    background: url("../img/lettabox.png") repeat-x left bottom;
    background-size: 91px, 85px;
    animation: move-down-lettabox 2s linear infinite;
}

.lettabox-up-strip {
    position: fixed;
    width: 100vw;
    height: 85px;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 1000;
    background: url("../img/lettabox2.png") repeat-x left bottom;
    background-size: 91px, 85px;
    animation: move-up-lettabox 2s linear infinite;
}

.title-container {
    position: relative;
    width: 100%;
    margin-top: 60px;
    margin-bottom: 30px;
}

.title-shadow {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    font-family: 'ourple';
    font-size: clamp(32px, 8vw, 82px);
    text-align: center;
    color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    text-shadow: 5px 5px 0 rgba(0, 0, 0, 1);
    -webkit-font-smoothing: antialiased;
    margin: 0;

    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.title {
    position: relative;
    width: 100%;
    font-family: 'ourple';
    font-size: clamp(32px, 8vw, 82px);
    text-align: center;
    z-index: 2;
    margin: 0;

    background: linear-gradient(90deg, #ff0000, #ff9900, #ffff00, #33ff00, #00ffff, #3300ff, #ff00cc, #ff0000);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-font-smoothing: antialiased;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: rainbow-text 3s linear infinite;

    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.main-box {
    max-width: 1350px;
    min-width: 300px;
    min-height: 350px;
    width: calc(100% - 20px);
    background: rgba(204, 0, 255, 0.7);
    border-radius: 16px;
    border: 4px solid #a357ab;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75);
    z-index: 3;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    opacity: 1;
    transform: translateX(0) scale(1);
}

.main-box.sliding-out {
    opacity: 0;
    transform: translateX(-100px) scale(0.95);
}

.credits-box {
    max-width: 1350px;
    min-width: 300px;
    min-height: 350px;
    width: calc(100% - 20px);
    background: rgba(255, 0, 119, 0.8);
    border-radius: 16px;
    border: 4px solid #cc003d;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75);
    z-index: 3;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    opacity: 0;
    transform: translateX(100px) scale(0.95);
}

.credits-box.sliding-in {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.credits-title {
    font-family: 'ourple';
    font-size: clamp(24px, 6vw, 48px);
    color: #fff;
    text-align: center;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 1);
    margin: 0;
    margin-bottom: 10px;
}

.credits-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    align-items: center;
    width: 100%;
    max-width: 960px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    color: #fff;
    font-family: 'ourple';
    font-size: clamp(24px, 2.5vw, 28px);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
    cursor: url("../img/cursors/ourple-finger.png"), pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    max-width: 120px;
    flex: 0 1 auto;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-icon {
    width: 128px;
    height: 128px;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

.credits-text {
    text-align: center;
    font-family: 'ourple';
    color: #fff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
}

.credits-text p {
    font-size: clamp(20px, 3.5vw, 24px);
    margin: 8px 0;
}

#back-button {
    font-family: 'ourple';
    font-size: clamp(16px, 3.5vw, 20px);
    color: #fff;
    background-color: rgba(204, 0, 255, 0.8);
    border: 2px solid #a357ab;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: url("../img/cursors/ourple-finger.png"), pointer;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    margin-top: 10px;
}

#back-button:hover {
    background-color: rgba(204, 0, 255, 1);
    transform: scale(1.05);
}

.credits {
    font-family: 'ourple';
    font-size: clamp(16px, 4vw, 24px);
    color: #fff;
    text-align: center;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 1);
}

#fullscreen-button {
    font-family: 'ourple';
    font-size: clamp(14px, 3vw, 18px);
    color: #fff;
    background-color: rgba(204, 0, 255, 0.7);
    text-decoration: underline;
    border-radius: 8px;
    border: 2px solid #a357ab;
    padding: 10px 20px;
    cursor: url("../img/cursors/ourple-finger.png"), pointer;
    transition: all 0.3s ease;
}

#fullscreen-button:hover {
    background-color: rgba(204, 0, 255, 0.9);
    transform: scale(1.05);
}

#play-button {
    font-family: 'ourple';
    font-size: clamp(24px, 6vw, 48px);
    color: #fff;
    background-color: rgba(204, 0, 255, 0.8);
    border: 4px solid rgba(144, 0, 180, 0.8);
    border-radius: 16px;
    padding: clamp(10px, 3vw, 20px) clamp(30px, 8vw, 60px);
    cursor: url("../img/cursors/ourple-finger.png"), pointer;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

#play-button:hover {
    background-color: rgba(204, 0, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(204, 0, 255, 0.5);
}

#download-button {
    font-family: 'ourple';
    font-size: clamp(16px, 3.5vw, 20px);
    color: #fff;
    background-color: rgba(255, 0, 119, 0.7);
    border: 2px solid #cc003d;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: url("../img/cursors/ourple-finger.png"), pointer;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

#download-button:hover {
    background-color: rgba(255, 0, 106, 0.9);
    transform: scale(1.05);
}

#patch-notes-button {
    font-family: 'ourple';
    font-size: clamp(16px, 3.5vw, 20px);
    color: #fff;
    background-color: #00dd1d;
    border: 2px solid rgba(0, 161, 35, 0.733);
    border-radius: 8px;
    padding: 12px 24px;
    cursor: url("../img/cursors/ourple-finger.png"), pointer;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

#patch-notes-button:hover {
    background-color: #00ff1d;
    transform: scale(1.05);
}

#start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes rainbow-text {
    to {
        background-position: 200% center;
    }
}

@keyframes move-down-lettabox {
    from { background-position-x: 0; }
    to { background-position-x: -91px; }
}

@keyframes move-up-lettabox {
    from { background-position-x: 0; }
    to { background-position-x: 91px; }
}

#game-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

#game_drop {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

#loray-man {
    position: fixed;
    display: block;
    image-rendering: pixelated;
    transform: scaleX(-4) scaleY(4);
    right: 14vw;
    bottom: 8vh;
    z-index: 999;
    cursor: url("../img/cursors/ourple-finger.png"), pointer;

    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}


/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    body {
        margin-bottom: 50px;
        padding: 5px;
        padding-top: 15px;
    }

    .main-box,
    .credits-box {
        min-width: 280px;
        margin-top: 0;
        padding: 15px;
        border-radius: 12px;
        gap: 10px;
    }

    .title-container {
        margin-bottom: 20px;
    }

    .title-shadow,
    .title {
        font-size: clamp(24px, 7vw, 48px);
    }

    .credits-title {
        font-size: clamp(20px, 5vw, 32px);
    }

    .social-links {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .social-link {
        padding: 10px;
        gap: 6px;
        min-width: 70px;
        max-width: 100px;
        font-size: clamp(12px, 2vw, 16px);
    }

    .social-icon {
        width: 36px;
        height: 36px;
        object-fit: contain;
        display: block;
    }

    .credits-text p {
        font-size: clamp(14px, 3vw, 16px);
    }

    #play-button {
        font-size: clamp(20px, 5vw, 32px);
        padding: clamp(8px, 2vw, 15px) clamp(20px, 6vw, 40px);
        margin-bottom: 15px;
    }

    #download-button,
    #patch-notes-button,
    #back-button {
        font-size: clamp(14px, 3vw, 18px);
        padding: 10px 20px;
    }

    #fullscreen-button {
        font-size: clamp(12px, 2.5vw, 16px);
        padding: 8px 16px;
    }

    .credits {
        font-size: clamp(12px, 3vw, 18px);
        line-height: 1.2;
    }

    .lettabox-down-strip,
    .lettabox-up-strip {
        height: 60px;
        background-size: 68px 60px;
    }

    #game_drop {
        width: 100% !important;
        height: 56.25vw !important;
        max-height: 400px !important;
        border-radius: 12px !important;
    }
}

@media screen and (max-width: 480px) {
    .main-box,
    .credits-box {
        min-width: 260px;
        margin-top: 0;
        padding: 10px;
        border: 2px solid #a357ab;
    }

    .credits-box {
        border-color: #cc003d;
    }

    .social-links {
        gap: 10px;
        flex-wrap: wrap;
    }

    .social-link {
        min-width: 60px;
        max-width: 90px;
        padding: 8px;
    }

    .lettabox-down-strip,
    .lettabox-up-strip {
        height: 40px;
        background-size: 45px 40px;
    }

    #game_drop {
        max-height: 300px !important;
        border-radius: 8px !important;
    }
}
