:root {
    --primary-color: #ff4169;
    --secondary-color: #ff8e53;
    --accent-color: #5ce1e6;
    --light-text: #ffffff;
    --overlay-bg: #0a0a0a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    margin: 0; 
    overflow: hidden; 
    font-family: 'Kanit', sans-serif;
    color: var(--light-text);
    height: 100vh;
    width: 100vw;
    background: var(--overlay-bg);
}

canvas { 
    width: 100%; 
    height: 100%; 
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: auto;
}

canvas.visible {
    opacity: 1;
}

#loading-screen {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: var(--overlay-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--light-text);
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    display: none;
    visibility: hidden;
}

#loading-screen h1 {
    font-weight: 400;
    font-size: 36px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--light-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--light-text);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-status {
    font-size: 16px;
    font-weight: 300;
    margin: 10px 0;
    min-height: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 0.5s;
}

#loading-files {
    width: 300px;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.loading-file {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-file span {
    color: var(--primary-color);
}

.loading-file.loading::after {
    content: '...';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

#loading-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 20px;
}

#loading-progress {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

#click-to-start {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg);
    color: white;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 999;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 1s ease;
}

#click-to-start.hidden {
    opacity: 0;
    pointer-events: none;
}

#click-to-start:hover {
    background: var(--overlay-bg);
}

#bio-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

#bio-container.visible {
    opacity: 1;
    pointer-events: none;
}

.profile-left,
.content-right {
    pointer-events: auto;
}

.profile-left {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translateY(-50%);
    z-index: 15;
}

.content-right {
    position: absolute;
    top: 50%;
    right: 25%;
    transform: translateY(-50%);
    text-align: right;
    z-index: 15;
}

.profile-picture-container {
    position: relative;
    width: 200px;
    height: 200px;
    transition: transform 0.5s ease;
    animation: float 5s ease-in-out infinite;
}

.profile-picture-container:hover {
    transform: scale(1.05);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 65, 105, 0.5);
    transition: all 0.5s ease;
}

.profile-picture:hover {
    box-shadow: 0 0 30px rgba(255, 65, 105, 0.7);
}

.profile-circle {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: rotate 15s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.idk {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    animation: fadeInRight 1s ease-out;
}

.profile-name {
    font-size: 60px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 65, 105, 0.6);
    animation: glow 1.5s ease-in-out infinite alternate, fadeInRight 1.2s ease-out;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px var(--primary-color);
    }
    to {
        text-shadow: 0 0 10px #fff, 0 0 20px var(--primary-color);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-subtitle {
    font-size: 24px;
    color: #ffffff;
    font-weight: 400;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    animation: fadeInRight 1.4s ease-out;
}

.divider {
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    margin: 0 0 20px auto;
    box-shadow: 0 0 10px rgba(255, 65, 105, 0.5);
    animation: widthGrow 1.2s ease-out;
}

@keyframes widthGrow {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

#heart-position {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.music-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: none;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.music-controls:hover {
    opacity: 1;
}

.music-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.music-toggle:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.visualizer-container {
    width: 80px;
    height: 30px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.visualizer-bar {
    flex: 1;
    background: var(--primary-color);
    height: 4px;
    border-radius: 2px;
    transition: height 0.1s ease;
    box-shadow: 0 0 8px rgba(255, 65, 105, 0.5);
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .profile-left { left: 20%; }
    .content-right { right: 20%; }
    .profile-name { font-size: 50px; }
    .profile-picture-container { width: 180px; height: 180px; }
    .profile-circle { width: 200px; height: 200px; }
}

@media (max-width: 992px) {
    .profile-left { left: 15%; }
    .content-right { right: 15%; }
    .profile-name { font-size: 40px; }
    .profile-subtitle { font-size: 20px; }
    .idk { font-size: 16px; }
    .profile-picture-container { width: 160px; height: 160px; }
    .profile-circle { width: 180px; height: 180px; }
}

@media (max-width: 768px) {
    #bio-container {
        flex-direction: column;
        justify-content: center;
        padding: 15px;
    }
    .profile-left {
        position: absolute;
        top: 20%;
        left: 50%;
        transform: translateX(-50%);
    }
    .content-right {
        position: absolute;
        top: auto;
        bottom: 20%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        text-align: center;
        width: 100%;
        padding: 0 15px;
    }
    .profile-name { font-size: 36px; }
    .divider { margin: 0 auto 15px; }
    .profile-picture-container { width: 140px; height: 140px; }
    .profile-circle { width: 160px; height: 160px; }
    .music-controls { bottom: 15px; right: 15px; }
    .music-toggle { width: 35px; height: 35px; }
}

@media (max-width: 480px) {
    .profile-name { font-size: 30px; }
    .profile-subtitle { font-size: 18px; }
    .idk { font-size: 14px; }
    .profile-picture-container { width: 120px; height: 120px; }
    .profile-circle { width: 140px; height: 140px; }
    #loading-bar { width: 90%; }
    #loading-files { width: 90%; }
    #loading-screen h1 { font-size: 28px; }
    #loading-status { font-size: 14px; }
    #loading-files { font-size: 12px; }
}