* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    background: #0a0a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    perspective: 1000px;
    transform-style: preserve-3d;
    padding: 20px;
}

#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
    filter: brightness(0.4);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.6);
    z-index: -1;
}

.panel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 15px;
    transform-style: preserve-3d;
    position: relative;
    flex: 1;
}

.tilt-boundary {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.profile-panel {
    width: 100%;
    max-width: 800px;
    background: rgba(15, 15, 30, 0.65);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    padding-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
    z-index: 10;
}

.banner {
    width: 100%;
    height: 160px;
    background: linear-gradient(45deg, #5865F2, #9146FF, #EB459E);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 15px;
}

.banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7));
}

.discord-id {
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 15px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    position: relative;
    margin-top: -70px;
    transform-style: preserve-3d;
    text-align: center;
}

.avatar-container {
    position: relative;
    z-index: 2;
    width: 130px;
    height: 130px;
    transform-style: preserve-3d;
    margin-bottom: 15px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(15, 15, 30, 0.55);
    background: linear-gradient(45deg, #5865F2, #9146FF);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 40px;
}

.status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 4px solid rgba(15, 15, 30, 0.55);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    z-index: 3;
    transform: translate(30%, 30%);
}

.status.online { background: #3ba55d; }
.status.idle { background: #faa81a; }
.status.dnd { background: #ed4245; }
.status.offline { background: #747f8d; }

.user-info {
    flex: 1;
    color: white;
    padding-top: 0;
    width: 100%;
}

.username {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.user-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 20px;
    width: fit-content;
    max-width: 100%;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    margin-left: auto;
    margin-right: auto;
}

.status-text {
    margin-left: 8px;
    color: #eee;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-emoji {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
    display: inline-block;
    flex-shrink: 0;
}

.bio-container {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.bio {
    font-size: 16px;
    color: #fff;
    min-height: 24px;
    overflow: hidden;
    position: relative;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    width: 100%;
    line-height: 1.4;
}

.bio::after {
    content: '|';
    animation: blink 1s infinite;
    position: absolute;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    color: white;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform-style: preserve-3d;
}

.icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.25);
}

.music-player {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 30px;
    padding: 8px 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 300px;
    height: 45px;
    pointer-events: none;
}

.music-info {
    color: white;
    font-size: 13px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.8);
}

.visualizer {
    height: 25px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 0 8px;
    pointer-events: none;
    flex-grow: 1;
    min-width: 0;
}

.visualizer-bar {
    width: 3px;
    background: linear-gradient(to top, #5865F2, #9146FF);
    border-radius: 2px;
    transition: height 0.1s ease;
    box-shadow: 0 0 4px rgba(88, 101, 242, 0.8);
    flex-shrink: 0;
}

#preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(25px);
    background: rgba(10, 10, 26, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

#enter-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 20px rgba(88, 101, 242, 0.8);
    cursor: pointer;
    animation: pulse 2s infinite, glow 3s infinite alternate;
    z-index: 2;
    position: relative;
    margin-bottom: 10px;
    text-align: center;
    padding: 0 20px;
    line-height: 1.2;
}

.hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    line-height: 1.4;
    max-width: 90%;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0% { text-shadow: 0 0 20px rgba(88, 101, 242, 0.8); }
    100% { text-shadow: 0 0 30px rgba(88, 101, 242, 1), 0 0 40px rgba(145, 70, 255, 0.8); }
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
}

/* Desktop */
@media (min-width: 768px) {
    .profile-content {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        padding: 20px;
        margin-top: -80px;
    }

    .avatar-container {
        margin-right: 20px;
        margin-bottom: 0;
        width: 150px;
        height: 150px;
    }

    .user-info {
        padding-top: 50px;
        align-items: flex-start;
    }

    .user-status {
        margin-left: 0;
        margin-right: 0;
    }

    .bio-container {
        text-align: left;
    }

    .banner {
        height: 200px;
        padding: 20px;
    }

    .discord-id {
        font-size: 16px;
        padding: 8px 20px;
    }

    .username {
        font-size: 32px;
    }

    .user-status {
        font-size: 16px;
        padding: 10px 18px;
    }

    .bio {
        font-size: 18px;
    }

    .icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .music-player {
        min-width: 280px;
        height: 50px;
        padding: 10px 20px;
        bottom: 20px;
        left: 20px;
        transform: none;
    }

    .music-info {
        font-size: 14px;
        max-width: 120px;
    }

    .visualizer {
        height: 30px;
        gap: 3px;
    }

    .visualizer-bar {
        width: 4px;
    }

    #enter-text {
        font-size: 3.5rem;
    }

    .hint {
        font-size: 1.2rem;
    }
}

@media (min-width: 992px) {
    .banner {
        height: 220px;
    }
}

@media (max-height: 600px) {
    .profile-panel {
        transform: scale(0.9);
    }
    
    .social-icons {
        margin-top: 10px;
    }
}