/* Reset and Core Variables */
:root {
    --bg-color: #030206;
    --card-bg: rgba(8, 6, 12, 0.7);
    --card-border: rgba(168, 85, 247, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --accent-purple: #b026ff;
    --accent-purple-light: #d946ef;
    --accent-purple-dark: #6b21a8;
    --accent-blue: #00d2ff;
    --accent-gold: #ffaa00;
    --accent-green: #00ff66;
    --glow-shadow: 0 0 25px rgba(176, 38, 255, 0.35);
    --font-main: 'Outfit', sans-serif;
    --font-digital: 'Share Tech Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor for custom cursor experience */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Scanlines Overlay */
body::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 99;
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
}

/* Custom Cursor */
#custom-cursor {
    width: 24px;
    height: 24px;
    border: 1px solid var(--accent-purple);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.15s, height 0.15s, background-color 0.15s, border-color 0.15s;
    mix-blend-mode: difference;
}

#custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-purple);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10001;
    mix-blend-mode: difference;
}

/* Interactive Canvas Background */
#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Main Container and Glass Card */
#main-content {
    z-index: 10;
    max-width: 440px;
    width: 90%;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 35px 25px 25px 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), var(--glow-shadow), inset 0 0 20px rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

/* Profile Section Styling */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.avatar-container {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light), var(--accent-purple-dark));
    background-size: 200% 200%;
    animation: rotateGradient 4s linear infinite;
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(10, 10, 16, 0.8);
}

.username {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.badges {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.badges i {
    font-size: 0.95rem;
    filter: drop-shadow(0 0 6px currentColor);
}

.badge-verified {
    color: var(--accent-blue);
}

.badge-developer {
    color: var(--accent-green);
}

.badge-premium {
    color: var(--accent-gold);
}

.bio-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    min-height: 20px;
    letter-spacing: 0.5px;
}

.cursor-blink {
    color: var(--accent-purple);
    font-weight: bold;
    animation: cursorBlink 0.8s infinite;
}

/* Custom Discord Presence Widget */
.presence-widget {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.online {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    background-color: var(--accent-green);
    animation: statusPulse 1.8s infinite ease-in-out;
}

.presence-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.presence-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.presence-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Social Links Grid */
.socials-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.social-item {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    text-decoration: none;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-item:hover {
    color: var(--text-primary);
    background: rgba(176, 38, 255, 0.1);
    border-color: var(--accent-purple);
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(176, 38, 255, 0.3);
}

/* Tooltip Styling */
.tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--accent-purple);
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent-purple) transparent transparent transparent;
}

.social-item:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Music Player Widget */
.music-player {
    width: 100%;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-top {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.disc-art {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: spin CD 8s linear infinite;
    animation-play-state: paused;
}

.disc-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex: 1;
}

.track-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-container {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-purple-light));
    border-radius: 10px;
    position: relative;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: -6px;
    font-family: var(--font-digital);
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 6px;
    transition: color 0.2s, transform 0.1s;
}

.control-btn:hover {
    color: var(--text-primary);
    transform: scale(1.08);
}

.control-btn:active {
    transform: scale(0.95);
}

.play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn:hover {
    background: rgba(176, 38, 255, 0.15);
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.3);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.volume-container i {
    font-size: 0.8rem;
}

#volume-slider {
    width: 60px;
    height: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    -webkit-appearance: none;
}

#volume-slider::-webkit-slider-runnable-track {
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-purple);
    cursor: pointer;
    transition: transform 0.1s;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Stats / View Counter Widget */
.stats-widget {
    width: 100%;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 16px;
}

.view-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.view-counter i {
    font-size: 0.85rem;
    color: var(--accent-purple);
    filter: drop-shadow(0 0 5px var(--accent-purple));
}

.counter-label {
    letter-spacing: 1px;
    font-weight: 600;
}

.counter-value {
    font-family: var(--font-digital);
    font-size: 0.95rem;
    color: var(--accent-purple);
    background: rgba(176, 38, 255, 0.05);
    border: 1px solid rgba(176, 38, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(176, 38, 255, 0.5);
}

/* Core Keyframe Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 5px rgba(176, 38, 255, 0.25)); }
    100% { filter: drop-shadow(0 0 18px rgba(176, 38, 255, 0.5)); }
}

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

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Interactive Cursor Hover Modifiers (Triggered via JS) */
.cursor-hover-active {
    width: 44px !important;
    height: 44px !important;
    background-color: rgba(176, 38, 255, 0.06);
    border-color: var(--accent-purple-light) !important;
}

/* Responsive Touch Device Rules */
@media (max-width: 768px) {
    * {
        cursor: auto !important; /* Restore normal cursor on mobile */
    }
    #custom-cursor, #custom-cursor-dot {
        display: none;
    }
    .enter-title {
        font-size: 2.8rem;
    }
    .glass-card {
        padding: 30px 20px 20px 20px;
    }
}
