/* --- [1] VARIABLES & ROOT --- */
:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --card-glass: rgba(30, 30, 30, 0.7);
    --border-color: #333;
    --border-light: rgba(255, 255, 255, 0.1);
    --text-main: #e5e5e5;
    --text-muted: #a3a3a3;
    --text-dim: #666;
    --accent-green: #4caf50;
    --accent-red: #f44336;
    --accent-linkedin: #0a66c2;
}

/* --- [2] GLOBAL SETTINGS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
}

/* --- [3] REFINED CENTER CARD & BUTTONS --- */
.card {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background-color: var(--card-glass);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.profile-pic {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    object-fit: cover;
    transition: all 0.4s ease;
}

.card:hover .profile-pic {
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02rem;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-weight: 400;
    opacity: 0.8;
}

/* --- MINIMALIST BUTTONS --- */
.contact-inline {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    background-color: transparent;
    /* Clean transparent look */
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    /* More space between letters = more premium */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn i {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Professional Hover States */
.btn:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.btn.linkedin:hover {
    border-color: var(--accent-linkedin);
    color: var(--accent-linkedin);
    background-color: rgba(10, 102, 194, 0.05);
}

.btn.email:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background-color: rgba(76, 175, 80, 0.05);
}

/* --- [4] DASHBOARD MODULES (Corner Cards) --- */

.status-overlay,
.music-card,
.credit-card {
    position: fixed;
    z-index: 100;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Top Corner Cards */
.status-overlay {
    top: 20px;
    left: 20px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Bottom Corner Cards - Matched exactly */
.music-card {
    bottom: 20px;
    left: 20px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
}

.credit-card {
    bottom: 20px;
    right: 20px;
    padding: 10px 14px;
}

/* Shared UI elements */
.status-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.music-card .status-label {
    font-size: 0.6rem;
    display: block;
    line-height: 1.2;
    margin-bottom: 1px;
}

.timer-text {
    margin-left: 4px;
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* Music Specific Styling */
.music-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Modern Slim Volume Slider --- */
.volume-container {
    margin-top: 8px;
    display: flex;
    align-items: center;
    width: 100%;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    /* Adjusted width for better feel */
    height: 2px;
    /* Ultra-thin track */
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

#volume-slider:hover {
    background: #444;
}

/* The Grabber (Thumb) - Chrome/Safari/Edge */
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: var(--text-muted);
    border-radius: 50%;
    border: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

#volume-slider:hover::-webkit-slider-thumb {
    background: var(--accent-green);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

/* The Grabber (Thumb) - Firefox */
#volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: var(--text-muted);
    border-radius: 50%;
    border: none;
    transition: all 0.2s ease-in-out;
}

#volume-slider:hover::-moz-range-thumb {
    background: var(--accent-green);
    transform: scale(1.2);
}

.music-icon-active {
    margin-right: 10px;
    font-size: 0.9rem;
    color: var(--accent-green);
}

/* Utilities */
#live-clock {
    /* Uses your body font but forces numbers to be equal width */
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    font-size: 1.4rem;
    /* Slightly larger for clarity */
    font-weight: 600;
    letter-spacing: -0.02rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 2px;
}

#live-date {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.heart-icon {
    margin: 0 4px;
    color: var(--accent-red) !important;
    font-size: 0.75rem;
    text-shadow: 0 0 5px rgba(244, 67, 54, 0.3);
}

.credit-icon {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-right: 4px;
}

/* --- [NEW] VISITOR STATUS BRIDGE (INTEGRATED) --- */
.visitor-status-bridge {
    position: fixed;
    bottom: 20px;
    left: 260px;
    right: 260px;
    height: 48px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    white-space: nowrap;
}

.bar-item i {
    color: var(--accent-green);
    font-size: 0.75rem;
    opacity: 0.7;
}

.bar-divider {
    width: 1px;
    height: 12px;
    background-color: var(--border-color);
    opacity: 0.4;
}

/* --- IP PRIVACY BLUR --- */
#visitor-ip {
    filter: blur(5px);
    transition: filter 0.3s ease, color 0.3s ease;
    cursor: help;
    user-select: none;
    padding: 0 4px;
}

/* Reveal when hovering over the parent bar-item */
.bar-item:hover #visitor-ip {
    filter: blur(0);
    color: var(--text-muted);
    user-select: text;
}

/* Mobile tap support */
#visitor-ip:active {
    filter: blur(0);
}

/* --- [5] ENTRY OVERLAY --- */
.glass-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    cursor: pointer;
    transition: opacity 1s ease, visibility 1s;
}

.entry-content {
    text-align: center;
}

.entry-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    animation: simple-pulse 3s infinite ease-in-out;
}

.glass-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* --- NEW TOP NAVBAR --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* Above everything but the entry overlay */
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.9), transparent);
}

.nav-right {
    display: flex;
    align-items: center; /* Forces the buttons to stay centered in the 60px height */
    gap: 15px;
}

.nav-brand {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    color: var(--text-muted);
}

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

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.nav-link i {
    font-size: 0.8rem;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
}

/* Container to stack clock and card */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    z-index: 5;
}

/* Redefining the clock to be subtle but centered */
.centered-time-display {
    text-align: center;
}

#live-clock {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    display: block;
}

#live-date {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15rem;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .main-nav { padding: 0 20px; }
    .nav-link span { display: none; } /* Show only icon on tiny screens */
}

.play-control {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-green);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-control:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.1);
}

.play-control i {
    font-size: 0.9rem;
    /* Offset the play icon slightly to the right to look centered in the circle */
    margin-left: 2px; 
}

/* Update the spin animation only when playing */
.fa-spin-slow {
    animation: fa-spin 3s infinite linear;
}

/* --- [6] ANIMATIONS --- */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.online {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
    animation: pulse 2s infinite;
}

.offline {
    background-color: var(--accent-red);
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        box-shadow: 0 0 0 5px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

@keyframes simple-pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* --- [7] RESPONSIVENESS --- */
@media (max-width: 480px) {
    .status-overlay {
        top: 10px;
        left: 10px;
    }

    .card {
        padding: 20px;
    }

    .music-card {
        bottom: 80px;
        left: 10px;
    }

    .credit-card {
        bottom: 20px;
        left: 10px;
        right: 10px;
        text-align: center;
    }
}