:root {
    --accent: #ffffff;
    --accent-b: #cccccc;
    --text: #fff;
    --muted: #aaa;
}
* {box-sizing: border-box; margin: 0; padding: 0;}
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
    background: radial-gradient(1200px 800px at 10% 10%, #1a1a1a, transparent 60%),
    radial-gradient(1000px 800px at 90% 20%, #2a2a2a, transparent 60%),
    radial-gradient(1000px 900px at 50% 100%, #111, transparent 60%),
    #000;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; color: var(--text);
    overflow: hidden;
    flex-direction: column;
}
#rainCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

.card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    backdrop-filter: blur(6px) saturate(180%);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
    padding: 32px;
    max-width: 420px;
    width: 92%;
    text-align: center;
    animation: fadeIn .6s ease both;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform .3s ease, box-shadow .3s ease;
    margin-bottom: 20px;
    z-index: 1;
}
.card:hover { transform: rotateY(6deg) rotateX(4deg) scale(1.02); }

@keyframes fadeIn { from { opacity:0; transform: translateY(10px);} to {opacity:1; transform: translateY(0);} }

#clock {
    font-size: 13px;
    color: white;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 8px rgba(255, 255, 255, .25);
    position: relative;
    z-index: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

h1 {
    font-size: 24px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

#motto {
    font-size: 16px;
    margin-bottom: 12px;
    min-height: 20px;
}

ul.languages { list-style: none; font-size: 14px; color: var(--muted); position: relative; z-index: 1; margin-bottom: 10px; }
ul.languages li { margin: 4px 0; }

.divider {
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
    margin: 12px 0;
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

.link-box {
    background: rgba(255,255,255,0.05);
    -webkit-backdrop-filter: blur(6px) saturate(160%);
    backdrop-filter: blur(6px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; margin: 14px 0;
    transition: transform .2s ease, box-shadow .3s ease; position: relative; z-index: 1;
}
.link-box:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.35); box-shadow: 0 0 14px rgba(255,255,255,0.6); }
.discord { display: flex; align-items: center; gap: 12px; }
.discord img { width: 42px; height: 42px; border-radius: 50%; }
.discord-info { text-align: left; font-size: 14px; }
.discord-info .online { color: #aaa; }
.discord-info .members { color: var(--muted); }

.btn { background: var(--accent); border: none; border-radius: 12px; color: #000; padding: 8px 16px; cursor: pointer; transition: background .2s; text-decoration: none; }
.btn:hover { background: #ccc; }

footer {
    margin-top: 18px;
    font-size: 13px;
    opacity: .85;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

footer .sep {
    color: white;
}

.cursor {
    display: inline-block;
    margin-left: 3px;
    width: 2px;
    background: var(--accent);
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.dramatic {
    color: #fff;
    text-shadow: 0 0 10px #aaa, 0 0 20px #555, 0 0 35px #888;
    position: relative;
}

@keyframes popOut {
    0% { opacity: 0; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fallDown {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(60px) rotate(25deg); }
}

.terminal {
    max-height: 450px;
    transition: none;
    width: 90%;
    max-width: 420px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 12px;
    font-family: monospace;
    font-size: 13px;
    color: #ccc;
    text-align: left;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}
.terminal-line { opacity: 0; animation: typeIn 1s forwards; }
@keyframes typeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes collapseUp {
    0% { max-height: 450px; }
    100% { max-height: 0; }
}

@keyframes screenGlitch {
    0%   { clip-path: inset(0 0 0 0); opacity: 1; filter: none; }
    20%  { clip-path: inset(10% 0 5% 0); opacity: 0.8; filter: grayscale(1) contrast(1.5); }
    40%  { clip-path: inset(5% 0 15% 0); opacity: 0.9; filter: grayscale(1) contrast(0.7); }
    60%  { clip-path: inset(0 0 20% 0); opacity: 0.75; filter: grayscale(1) saturate(1.5); }
    80%  { clip-path: inset(15% 0 0 0); opacity: 0.85; filter: grayscale(1) contrast(1.2); }
    100% { clip-path: inset(0 0 0 0); opacity: 1; filter: none; }
}

.glitch-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    mix-blend-mode: difference;
    animation: screenGlitch 0.15s infinite;
    pointer-events: none;
    z-index: 9998;
}

.overlay-ip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1);
    background: #0a0a0a;
    color: #fff;
    padding: 25px 40px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 0 25px #fff, 0 0 50px #aaa;
    z-index: 9999;
    animation: ipGlitch 0.2s infinite alternate;
}

@keyframes ipGlitch {
    0%   { transform: translate(-50%, -50%) scale(1.1) skew(0deg, 0deg); text-shadow: 2px 0 #fff, -2px 0 #aaa; }
    50%  { transform: translate(-50%, -50%) scale(1.15) skew(-2deg, 2deg); text-shadow: -2px 0 #aaa, 2px 0 #fff; }
    100% { transform: translate(-50%, -50%) scale(1.1) skew(2deg, -2deg); text-shadow: 2px 0 #ddd, -2px 0 #999; }
}

#lightning {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0);
    pointer-events: none;
    z-index: 0;
}

#welcomeOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
    pointer-events: auto;
}
#welcomeOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}
#welcomeOverlay span {
    font-size: 28px;
    font-family: monospace;
    color: #fff;
    border-right: 2px solid #fff;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: typing 2s steps(18) forwards, blink 1s infinite step-end alternate;
}
@keyframes typing {
    from { width: 0; }
    to { width: 18ch; }
}
@keyframes blink {
    50% { border-color: transparent; }
}

body.blurred > *:not(#welcomeOverlay) {
    filter: blur(6px);
    transition: filter 0.8s ease;
}
body:not(.blurred) > * {
    filter: blur(0);
}

#nowPlaying {
    width: 92%;
    max-width: 420px;
    margin-bottom: 18px;
}
.now-playing {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
    font-size: 14px;
}
.now-playing img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}
.now-playing-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.now-playing-info .title {
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}
.now-playing-info .artist {
    font-size: 13px;
    color: #c7c7c7;
    margin-bottom: 4px;
}
.now-playing-info .time {
    font-size: 12px;
    color: #aaa;
}
.now-playing .progress {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
}
.now-playing .progress .bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fff, #ccc);
    border-radius: 6px;
}

#bsodOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #111;
    color: white;
    font-family: "Segoe UI", sans-serif;
    z-index: 9999;
    text-align: left;
    padding: 80px;
}
.bsod-content {
    max-width: 800px;
}
.bsod-content .face {
    font-size: 80px;
    margin-bottom: 20px;
}
.bsod-content .text {
    font-size: 22px;
    line-height: 1.5;
}
.bsod-content .error {
    display: block;
    margin-top: 20px;
    font-size: 18px;
}
.bsod-content .percent {
    font-size: 18px;
}