/* ============================================================
   HOME.CSS — Profile card, nav, music player, social links
   ============================================================ */

/* ================================
   MODERN BACKEND DEV PROFILE
   ================================ */

.profile-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    transition: transform 0.1s ease-out;
    max-width: 500px;
    width: 90%;
}

/* Code decorators */
.code-decoration {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    position: absolute;
    opacity: 0.4;
    letter-spacing: 1px;
}

.code-decoration.top-left {
    top: -30px;
    left: 0;
}

.code-decoration.bottom-right {
    bottom: -30px;
    right: 0;
}

/* Profile Card */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid var(--border-subtle);
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.profile-image:hover img {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
}

.status-ring {
    display: none;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* Username with code brackets */
.username {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.code-bracket {
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 300;
    opacity: 0.6;
}

/* Typing Role Animation */
.typing-role {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.role-prefix {
    color: rgba(255, 255, 255, 0.5);
}

.role-text {
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.role-cursor {
    color: var(--primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Tag line */
.tag-line {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag-icon {
    font-size: 0.85rem;
}

.separator {
    color: var(--text-muted);
}

/* Stats Terminal - Modern Glassmorphism */
.stats-terminal {
    background: rgba(20, 20, 35, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-align: left;
    width: 100%;
    max-width: 340px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.stat-line {
    margin: 5px 0;
    display: flex;
    gap: 8px;
}

.stat-key {
    color: rgba(255, 255, 255, 0.5);
}

.stat-colon {
    color: rgba(255, 255, 255, 0.3);
}

.stat-value.string {
    color: #7dd3fc;
    text-shadow: 0 0 10px rgba(125, 211, 252, 0.3);
}

.stat-value.string::before,
.stat-value.string::after {
    content: '"';
    color: rgba(255, 255, 255, 0.4);
}

.stat-value.array {
    color: #fcd34d;
    text-shadow: 0 0 10px rgba(252, 211, 77, 0.3);
}

.stat-value.boolean {
    color: #a78bfa;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.85rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.status-text {
    color: var(--text-secondary);
}

/* Social Links - Win7 Aero Glass Style */
.social-links {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(25, 25, 40, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.social-icon svg {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 30, 50, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.social-icon:hover svg {
    fill: var(--primary);
}

/* Platform-specific hover colors */
.social-icon.github:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.social-icon.discord:hover {
    border-color: #5865F2;
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.2);
}
.social-icon.discord:hover svg { fill: #5865F2; }

.social-icon.youtube:hover {
    border-color: #FF0000;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.15);
}
.social-icon.youtube:hover svg { fill: #FF0000; }

.social-icon.twitch:hover {
    border-color: #9146FF;
    box-shadow: 0 8px 25px rgba(145, 70, 255, 0.2);
}
.social-icon.twitch:hover svg { fill: #9146FF; }

.social-icon.steam:hover {
    border-color: #1b2838;
    box-shadow: 0 8px 25px rgba(27, 40, 56, 0.3);
}

/* Social Tooltip */
.social-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(25, 25, 45, 0.55);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-icon:hover .social-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

/* Music Player - Modern Glassmorphism */
.music-player {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: 
        "thumbnail info controls volume";
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(20, 20, 35, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: auto;
    max-width: 400px;
    z-index: 100;
}

.music-thumbnail {
    grid-area: thumbnail;
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.music-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-info {
    grid-area: info;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.music-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-artist {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-controls {
    grid-area: controls;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modern glassmorphism play button */
.play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Control buttons (prev/next) */
.control-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Add this class to be applied when audio fails */
.music-player.needs-interaction {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* Volume Control Styles - Win7 Aero */
.volume-control {
    grid-area: volume;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 70px;
    gap: 6px;
}

.volume-slider-container {
    height: 50px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 100%);
    border-radius: 4px;
    padding: 4px;
}

.volume-slider {
    -webkit-appearance: none;
    height: 100%;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.25) 100%);
    outline: none;
    writing-mode: bt-lr; /* IE */
    -webkit-appearance: slider-vertical; /* WebKit */
    transition: opacity 0.2s;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: 
        linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(220,225,240,0.9) 100%);
    border: 1px solid rgba(150, 160, 190, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: 
        linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(235,240,255,0.95) 100%);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: 
        linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(220,225,240,0.9) 100%);
    border: 1px solid rgba(150, 160, 190, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    background: 
        linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(235,240,255,0.95) 100%);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.4);
}

.volume-slider:focus {
    outline: none;
}

/* Responsive — volume control on small screens */
@media (max-width: 576px) {
    .volume-slider-container {
        width: 50px;
    }
    
    .volume-control {
        margin-left: 8px;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .music-player {
        width: 90%;
        bottom: 15px;
        padding: 8px 12px;
    }
    
    body {
        padding-bottom: 60px;
    }
}

@media (max-width: 360px) {
    .music-player {
        width: 95%;
        bottom: 10px;
        padding: 6px 10px;
    }
    
    .music-thumbnail {
        width: 45px;
        height: 45px;
    }
    
    .music-controls {
        grid-column: 1;
        margin-top: 8px;
    }
    
    .volume-control {
        grid-column: 2;
        flex-direction: column;
        align-items: flex-end;
        margin-top: 8px;
    }
    
    body {
        padding-bottom: 120px;
    }
}

/* Navigation Menu - Modern Glassmorphism */
.nav-menu {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 1000;
    background: rgba(20, 20, 35, 0.45);
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-item {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-icon {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item:hover .nav-icon {
    color: rgba(255, 255, 255, 0.7);
}

.nav-item.nav-active {
    color: var(--primary);
    background: rgba(79, 195, 247, 0.15);
}

/* Glitch Nav Item Animation */
.glitch-nav-item {
    position: relative;
    transition: transform 0.3s ease;
}

.glitch-text {
    position: relative;
    display: inline-block;
    color: #c084fc;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.glitch-nav-item:hover .glitch-text {
    color: #e879f9;
    text-shadow: 0 0 15px rgba(232, 121, 249, 0.5);
}

.glitch-text::before {
    display: none;
}

/* Subtle horizontal offset for glitching */
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    left: 2px;
    text-shadow: -1px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 8s infinite linear alternate-reverse;
}

.glitch-nav-item:hover {
    transform: translateY(-2px);
}

.glitch-nav-item:hover .glitch-text {
    color: #fff;
}

.glitch-nav-item:hover .glitch-text::before {
    opacity: 0.7;
    animation: glitch-gradient 2s infinite linear;
}

.glitch-nav-item:hover .glitch-text::after {
    animation: glitch-anim 1.5s infinite linear alternate-reverse;
    opacity: 0.7;
}

/* Gradient animation - Limited to pink/purple */
@keyframes glitch-gradient-limited {
    0% { 
        background: linear-gradient(45deg, #8778ff 0%, #ff00ff 100%);
        background-clip: text;
        -webkit-background-clip: text;
    }
    50% { 
        background: linear-gradient(45deg, #ff00ff 0%, #8778ff 100%);
        background-clip: text;
        -webkit-background-clip: text;
    }
    100% { 
        background: linear-gradient(45deg, #8778ff 0%, #ff00ff 100%);
        background-clip: text;
        -webkit-background-clip: text;
    }
}

/* Gradient animation */
@keyframes glitch-gradient {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Subtle glitching effect */
@keyframes glitch-anim {
    0% { 
        opacity: 0.3;
        transform: translateX(-0.5px);
        clip: rect(0, 450px, 0, 0);
    }
    5% {
        clip: rect(0, 450px, 0, 0);
    }
    10% {
        clip: rect(0, 450px, 0, 0);
    }
    15% {
        clip: rect(10px, 450px, 12px, 0); 
    }
    20% {
        clip: rect(0, 450px, 0, 0);
    }
    25% {
        opacity: 0.6;
        transform: translateX(0.5px);
        clip: rect(42px, 450px, 44px, 0); 
    }
    30% {
        clip: rect(0, 450px, 0, 0);
    }
    35% { 
        clip: rect(0, 450px, 0, 0);
    }
    40% {
        opacity: 0.3;
        transform: translateX(-0.5px);
        clip: rect(15px, 450px, 18px, 0); 
    }
    45% {
        clip: rect(0, 450px, 0, 0);
    }
    50% {
        clip: rect(0, 450px, 0, 0);
    }
    55% {
        opacity: 0.6;
        transform: translateX(0.5px);
        clip: rect(32px, 450px, 36px, 0); 
    }
    60% {
        clip: rect(0, 450px, 0, 0);
    }
    65% {
        clip: rect(0, 450px, 0, 0);
    }
    70% {
        opacity: 0.3;
        transform: translateX(-0.5px);
        clip: rect(62px, 450px, 65px, 0);
    }
    75% {
        clip: rect(0, 450px, 0, 0);
    }
    80% {
        clip: rect(0, 450px, 0, 0);
    }
    85% {
        opacity: 0.6;
        transform: translateX(0.5px);
        clip: rect(22px, 450px, 25px, 0);
    }
    90% {
        clip: rect(0, 450px, 0, 0);
    }
    95% {
        clip: rect(0, 450px, 0, 0);
    }
    100% {
        opacity: 0.3;
        transform: translateX(-0.5px);
        clip: rect(52px, 450px, 55px, 0);
    }
}

/* Add a subtle active state marker when the section is open */
.glitch-nav-item.nav-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #8778ff, #ff00ff);
    border-radius: 1px;
    animation: fadeIn 0.3s forwards;
    display: none;
}

.nav-item.nav-active::after {
    display: none;
}

/* Ko-fi Tip Button */
.tip-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 500;
    margin: 0;
}

/* On desktop, hide the one inside profile and show fixed one */
.profile-container .tip-button-container {
    position: static;
    display: none;
}

@media (max-width: 768px) {
    /* On mobile, show the one inside profile, hide fixed positioning */
    .tip-button-container {
        position: static;
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }
}

.tip-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
}

.tip-button::before {
    display: none;
}

.tip-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: none;
    box-shadow: none;
}

.tip-button:hover::before {
    display: none;
}

.tip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #526dff, #ff56f6);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    padding: 5px;
}

.tip-icon svg {
    width: 16px;
    height: 16px;
    color: white;
}

.tip-text {
    background: linear-gradient(90deg, #fff, #e0e0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Image Teaser for Glitch Studios */
.glitch-image-teaser {
    position: fixed;
    bottom: -500px;
    right: 50px;
    z-index: 999;
    cursor: pointer;
    width: 600px;
    height: 600px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: float 3s infinite ease-in-out;
}

.glitch-image-teaser:hover {
    bottom: -300px;
    transform: scale(1.03);
}

.teaser-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.default-image {
    opacity: 1;
}

.hover-image {
    opacity: 0;
}

.glitch-image-teaser:hover .default-image {
    opacity: 0;
}

.glitch-image-teaser:hover .hover-image {
    opacity: 1;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@media (max-width: 768px) {
    .glitch-image-teaser {
        width: 100px;
        height: 100px;
        bottom: 20px;
        right: 20px;
    }

    .nav-menu {
        flex-wrap: wrap;
        top: 10px;
        right: 10px;
        left: 10px;
        justify-content: center;
    }

    .nav-item {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}
