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

body {
    background-color: #0d0d0d;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    opacity: 0.5; /* Giảm độ sáng của video để chữ dễ đọc hơn */
}

/* Welcome Screen */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050505;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

.click-text {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
}

/* Background Rain Effect (Simple CSS Implementation) */
.rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 100%),
        url('data:image/svg+xml;utf8,<svg width="4" height="4" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="4" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100% 100%, 20px 40px;
    z-index: -1;
    animation: rain 0.5s linear infinite;
    opacity: 0.5;
}

@keyframes rain {
    0% { background-position: 0% 0%, 0 0; }
    100% { background-position: 0% 100%, 0 40px; }
}

/* Main Content Layout */
#main-content {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    opacity: 1;
    transition: opacity 1.5s ease-in;
}

#main-content.hidden {
    opacity: 0;
    pointer-events: none;
}

.about-me-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.4);
    margin-bottom: -1rem;
}

/* Profile Section */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-decoration {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120% !important;
    height: 120% !important;
    pointer-events: none;
    z-index: 2;
    border-radius: 0 !important;
}

.avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
}

.custom-avatar-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px; /* To hơn avatar một chút để bao bọc xung quanh */
    height: 180px;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Không cản trở việc click vào avatar */
    z-index: 2;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    z-index: 2;
    position: relative;
}

.glow-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,0.8) 20%, transparent 40%);
    animation: spin-glow 4s linear infinite;
    z-index: 1;
    filter: blur(8px);
}

@keyframes spin-glow {
    100% { transform: rotate(360deg); }
}

.username {
    font-family: 'Times New Roman', serif;
    font-size: 3.5rem;
    font-style: italic;
    font-weight: 500;
    text-shadow: 0 0 15px rgba(255,255,255,0.6), 0 0 30px rgba(255,255,255,0.3);
    position: relative;
    letter-spacing: 2px;
    transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.username:hover {
    text-shadow: 0 0 25px rgba(255,255,255,0.9), 0 0 50px rgba(255,255,255,0.6);
    transform: scale(1.05);
}

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.icon {
    color: rgba(255,255,255,0.6);
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon:hover {
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,0.8);
    transform: translateY(-5px) scale(1.25);
}

.riot-icon {
    width: 1.15rem;
    height: 1.15rem;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    vertical-align: middle;
    margin-top: -4px;
}

.icon:hover .riot-icon {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

.valo-icon {
    width: 1.1rem;
    height: 1.1rem;
    filter: brightness(0) invert(1) opacity(0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    vertical-align: middle;
    margin-top: -4px;
}

.icon:hover .valo-icon {
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

/* Glassmorphism Cards */
.cards-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
    justify-content: center;
}

.glass-card {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(255,255,255,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.label-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
}

.header-discord-icon {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

.add-friend-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.add-friend-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.corner-icon {
    color: rgba(255,255,255,0.2);
}

/* Discord Profile Card */
.discord-profile {
    flex: 1;
    min-width: 300px;
}

.discord-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.discord-avatar {
    position: relative;
    width: 75px;
    height: 75px;
}

.discord-avatar > img:not(.avatar-decoration) {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.discord-avatar .avatar-decoration {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    pointer-events: none;
    z-index: 2;
    border-radius: 0;
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 4px solid #1a1a1a;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.status-online {
    background-color: #23a559;
}

.status-dnd {
    background-color: #f23f43;
}
.status-dnd::after {
    content: '';
    width: 12px;
    height: 3px;
    background-color: #1a1a1a;
    border-radius: 1.5px;
}

.status-idle {
    background-color: #f0b232;
}
.status-idle::after {
    content: '';
    width: 14px;
    height: 14px;
    background-color: #1a1a1a;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    left: -2px;
}

.status-offline {
    background-color: #80848e;
}
.status-offline::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #1a1a1a;
    border-radius: 50%;
}

.discord-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.discord-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.discord-pronouns {
    font-size: 0.9rem;
    color: #b9bbbe;
}

.custom-status {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin: 4px 0;
}

.badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.discord-badge {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    transition: transform 0.2s;
    cursor: pointer;
}

.discord-badge:hover {
    transform: scale(1.2);
}

/* Custom Tooltip */
.discord-tooltip {
    position: fixed;
    background-color: #111214;
    color: #dbdee1;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.24);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.1s ease, transform 0.1s ease;
    white-space: nowrap;
}

.discord-tooltip.show {
    opacity: 1;
    transform: scale(1);
}

.discord-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #111214 transparent transparent transparent;
}

.custom-badge-icon {
    font-size: 1.2rem;
    transition: transform 0.2s;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.custom-badge-icon:hover {
    transform: scale(1.2);
}

/* Discord Server Card */
.server-card {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.server-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
}

.server-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.server-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 4px;
}

.server-info h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
}

.member-count {
    font-size: 0.85rem;
    color: #b5bac1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #23a559; /* Discord's exact green */
    border-radius: 50%;
    display: inline-block;
}

.join-btn {
    background-color: #248046;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.join-btn:hover {
    background-color: #1a6334;
}

/* Music Player */
.music-player {
    width: 100%;
}

.player-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.album-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.album-art {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
}

.equalizer {
    display: flex;
    gap: 3px;
    height: 12px;
    align-items: flex-end;
}

.equalizer span {
    width: 3px;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    animation: eq 0.8s ease-in-out infinite alternate;
    animation-play-state: paused;
}
.equalizer span:nth-child(1) { animation-delay: 0.1s; height: 100%; }
.equalizer span:nth-child(2) { animation-delay: 0.3s; height: 60%; }
.equalizer span:nth-child(3) { animation-delay: 0.5s; height: 80%; }
.equalizer span:nth-child(4) { animation-delay: 0.2s; height: 40%; }

@keyframes eq {
    0% { height: 20%; }
    100% { height: 100%; }
}

.album-art.spinning {
    animation: spin 10s linear infinite;
    animation-play-state: paused; /* Will be played via JS */
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.track-info {
    flex: 1;
}

#track-name {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time {
    font-size: 0.7rem;
    font-family: 'Space Mono', monospace;
    color: rgba(255,255,255,0.5);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-right: 10px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.ctrl-btn {
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ctrl-btn:hover {
    color: #fff;
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.play-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-circle i {
    font-size: 0.9rem;
}

.play-circle .fa-play {
    margin-left: 3px; /* Visually center the play triangle */
}

.play-circle:hover {
    border-color: #fff;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#volume-icon {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    width: 15px;
    text-align: center;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px; /* Made smaller */
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem 1rem;
    }
    
    .username {
        font-size: 2.8rem;
    }
    
    .cards-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .discord-profile, .server-card {
        min-width: 100%;
    }
    
    .player-content {
        flex-direction: column;
        text-align: center;
    }
    
    .controls {
        justify-content: center;
    }
}

/* Anti-Inspect Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
    margin-top: 4px;
    display: block;
}

.toast i {
    font-size: 0.6rem;
    margin-right: 6px;
    color: #fff;
    vertical-align: middle;
}
