/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface2: #111111;
  --border: rgba(255,255,255,0.07);
  --text: #e8e8e8;
  --muted: #6a6a6a;
  --accent: #ffffff;
  --accent2: #cccccc;
  --white: #ffffff;
  --font-ui: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html, body { height: 100%; overflow: hidden; }

body {
  background-color: #000;
  background-image: url('https://cdn.discordapp.com/attachments/1270538694956154890/1532036282371412008/tipuzzailniculo3.png?ex=6a6b6379&is=6a6a11f9&hm=f7a57625132c3bd6ae8a2105a42df4324e75cc47846eeae9531921e9d747342b&');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

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

/* ========== SPLASH ========== */
.splash {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: splashIn 1s ease forwards;
}

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

.splash-avatar-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 3px;
  box-shadow: 0 0 30px rgba(255,255,255,0.3);
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 20px rgba(255,255,255,0.2); }
  50%       { box-shadow: 0 0 40px rgba(255,255,255,0.5), 0 0 60px rgba(255,255,255,0.2); }
}

.splash-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.3);
}

.splash-name {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  text-shadow: 0 0 20px rgba(255,255,255,0.6);
}

/* Audio bars */
.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.audio-bars span {
  width: 3px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: bar 1.2s ease-in-out infinite;
}

.audio-bars span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.audio-bars span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.audio-bars span:nth-child(3) { height: 20px; animation-delay: 0.3s; }
.audio-bars span:nth-child(4) { height: 14px; animation-delay: 0.45s; }
.audio-bars span:nth-child(5) { height: 8px;  animation-delay: 0.6s; }

@keyframes bar {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

.click-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  animation: blink 2s ease-in-out infinite;
}

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

/* ========== MAIN PAGE ========== */
.main {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 0.6s ease;
}

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

.main.visible {
  opacity: 1;
  pointer-events: all;
}

/* Stars canvas */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ========== PROJECTS BUTTON ========== */
.projects-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 13px 28px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.projects-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  color: var(--accent2);
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* ========== CARD ========== */
.card {
  background: rgba(17,17,17,0.85);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* ========== PROFILE CARD ========== */
.card-banner {
  background: linear-gradient(135deg, #111 0%, #0a0a0a 50%, #000 100%);
  border-radius: 12px 12px 0 0;
  margin: -20px -20px 16px;
  height: 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px 14px;
}

.card-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,0.25) 0%, transparent 60%);
}

.banner-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}

.profile-info {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  margin-top: -36px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  object-fit: cover;
  filter: grayscale(0.2);
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.avatar-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%);
  animation: avatar-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes avatar-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

.profile-details { padding-top: 4px; }

.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  position: relative;
}

.username {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.badge {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.handle {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.role {
  font-size: 0.88rem;
  color: var(--text);
}

/* ========== DISCORD STATUS & SOCIALS ========== */
.discord-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #747f8d; /* Offline */
  margin-left: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.discord-status.online { background: #3ba55d; box-shadow: 0 0 10px #3ba55d; }
.discord-status.idle { background: #faa61a; box-shadow: 0 0 10px #faa61a; }
.discord-status.dnd { background: #ed4245; box-shadow: 0 0 10px #ed4245; }

.socials {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.discord-btn:hover {
  background: #5865F2; 
  border-color: #5865F2;
}

/* ========== MUSIC PLAYER ========== */
.music-card { position: relative; overflow: hidden; }

.music-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
}

.music-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.vol-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.volume-slider {
  -webkit-appearance: none;
  width: 60px;
  height: 3px;
  border-radius: 2px;
  background: var(--surface2);
  outline: none;
  cursor: pointer;
}

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

.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }

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

.ctrl-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s, transform 0.15s;
}

.ctrl-btn:hover { color: var(--white); transform: scale(1.15); }

.play-btn {
  background: var(--white);
  color: #000 !important;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255,255,255,0.4);
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.play-btn:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(255,255,255,0.6) !important;
}

.track-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  max-width: 110px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Progress */
.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  min-width: 28px;
}

.progress-bar {
  flex: 1;
  height: 3px;
  background: var(--surface2);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s linear;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
  transition: left 0.5s linear;
  opacity: 0;
  transition: opacity 0.2s, left 0.5s linear;
}

.progress-bar:hover .progress-thumb { opacity: 1; }

/* Playlist */
.playlist { display: flex; flex-direction: column; gap: 2px; }

.playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.playlist-item:hover { background: rgba(255,255,255,0.05); }

.playlist-item.active {
  background: rgba(255,255,255,0.12);
}

.playlist-item.active .pl-num { color: var(--accent2); }
.playlist-item.active .pl-name { color: var(--white); }

.pl-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 16px;
  text-align: center;
}

.pl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  display: none;
}

.playlist-item.active .pl-dot { display: block; }
.playlist-item.active .pl-num { display: none; }

.pl-name {
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1;
}

/* ========== PROJECTS SECTION ========== */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.project-list { display: flex; flex-direction: column; gap: 8px; }

.project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.project-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
  transform: translateX(4px);
}

.project-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.project-info { flex: 1; }

.project-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.project-desc {
  font-size: 0.72rem;
  color: var(--muted);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent2);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.1em;
  padding-top: 10px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }

/* ========== MODAL ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  width: 90%;
  max-width: 550px;
  position: relative;
  padding: 30px;
  animation: modalIn 0.3s ease forwards;
}

@keyframes modalIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.close-modal:hover { color: var(--white); }

.modal-title {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--white);
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.4;
}

.modal-showcase img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.modal-showcase img.hidden { display: none; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: #000;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

.download-btn.hidden { display: none; }

/* ========== RESPONSIVE ========== */
@media (max-width: 500px) {
  .container { padding: 30px 12px 50px; }
  .splash-name { font-size: 1.4rem; }
}
