@font-face {
  font-family: "VCR OSD Mono";
  src: url("/fonts/VCR_OSD_MONO_1.001.ttf");
}

/* === keyframes */

@keyframes shimmer {
  0% {
    background-position: -150% center; /* start off more left */
  }
  100% {
    background-position: 150% center; /* end off more right */
  }
}

@keyframes screen-enter {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes line-fade {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-slide-out {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
}

@keyframes bounce-in {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  60% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* === body */
body {
  font-family: "VCR OSD Mono", serif !important;
  font-size: 16px;
  color: #fff;
  margin: 0;
  padding: 0;
  background: #202020;
  overflow-x: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.scrollable-box::-webkit-scrollbar,
#tech::-webkit-scrollbar,
#specs::-webkit-scrollbar {
  display: none;
  width: 6px;
}
#tech::-webkit-scrollbar-thumb,
#specs::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 10px;
}

/* === discord status dot */
.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  background-color: gray; /* default */
}

.status-online { background-color: #43b581; }
.status-idle { background-color: #faa61a; }
.status-dnd { background-color: #f04747; }
.status-offline { background-color: #747f8d; }

/* === titles etc */

h1, .title, .subtitle {
  margin: 0;
}

hr {
  border: none;
  border-top: 1px solid #444;
  margin: 25px 0;
}

.main-title {
  position: relative;
  text-align: center;
  align-items: center;
  min-height: 100px;
  margin: 20px auto 10px auto;
  font-family: "VCR OSD Mono", monospace;
  font-size: clamp(28px, 6vw, 60px);
  color: #ffffff;
  text-shadow:
    0 0 2px #6600ff,
    0 0 5px #6600ff,
    0 0 8px #6600ff,
    0 0 12px #6600ff,
    5px 5px 15px #6600ff; /* Larger offset and blur */
  letter-spacing: 2px;
  line-height: 1;
  animation: crt-glow 2.4s infinite alternate ease-in-out;
  overflow: hidden;
  display: flex;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  text-decoration-color: #6600ff;
}

.title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  padding: 0 20px;
  box-sizing: border-box;
}

.subtitle { 
  font-size: 1.1rem; 
}

h1 {
  font-size: 30px;
  margin: 20px 0 5px;
}

/* === line animation */
.line {
  opacity: 0;
  animation: line-fade 0.4s ease forwards;
}

/* === perspective hover */
.perspective-hover {
  display: inline-block;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.2s ease, box-shadow 0s ease, filter 0.2s ease;
}
.perspective-hover:hover {
  transform: perspective(600px) rotateX(5deg) rotateY(-5deg) scale(1.3);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.4);
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* === text shimmer effect */
.shimmer {
  background: linear-gradient(
    90deg,
    currentColor 0%,
    rgba(102, 0, 255, 1) 40%,
    currentColor 80%
  );
  background-size: 300% auto;
  background-clip: text;
  -webkit-background-clip: text;  
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
  display: inline-block;
  font-weight: bold;
}

/* === main screen */
.screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2rem 2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 0.1rem solid #fff;
  text-align: left;
  box-shadow: 1.5rem 1.5rem 2rem #000;
  border-radius: 10px;
  animation: screen-enter 0.6s cubic-bezier(0.5,-0.2,0.3,1.2);
}

.fade-close {
  animation: fade-slide-out 0.4s ease-out forwards !important;
}

/* === images */
.header-image { 
  margin-right: 10px; 
  height: 100px; 
  width: auto; 
  text-align: left; 
  vertical-align: middle; 
  object-fit: contain; 
  -webkit-user-drag: none;
  border-radius: 10px;
}
.stretched-image { 
  height: 100px; width: 200px; object-fit: fill; 
}

.lastfm-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
}

.cover-image {
  height: 100px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  -webkit-user-drag: none;
  border-radius: 10px;
}

/* === links */
a {
  color: #fff;
  font-size: 1.1rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  text-decoration-color: #6600ff;
  cursor: pointer;
  transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
  text-shadow: 0 0 5px #fff;
  opacity: 1;
  text-decoration-color: #6600ff;
}

a:active {
  color: #fff;
  text-decoration-color: #6600ff;
}

/* Buttons */
.button, #tech .button, #specs .button, .fixed-close {
  position: sticky;
  top: 15px;
  right: 15px;
  margin-left: auto;
  margin-bottom: -40px; /* <<< to usuwa "wcięcie" */
  display: block;
  z-index: 10001;
  text-decoration: none; /* Disable underline */
}

.button {
  font-size: 30px;
  font-weight: bold;
  color: #3f3f3f;
  background: #666;
  border: 2px solid #444;
  border-radius: 10px;
  padding: 5px 10px;
  cursor: pointer;
  transition: transform .2s ease, color .3s ease, background-color .3s ease;
}

.button:hover {
  color: #000;
  background: #fff;
  transform: translateY(-3px);
}

.button:active {
  color: #000;
  background: #fff;
  transform: scale(0.7);
}

.button:focus { 
  outline: none; 
}

#buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 16px auto;
  max-width: 100%;
}

/* === main page buttons */

.link-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;         
  justify-content: center;  
  gap: 12px; 
  margin: 16px auto;
  overflow-x: auto; 
  padding: 0 10px;
}

.circle-btn {
  width: 30px;
  height: 20px;
  border-radius: 12px;
  background-color: #1e1e1e;
  color: white;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid #444;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transform-origin: center;
  padding: 5px;
}

.circle-btn:hover {
  background-color: #333;
  border-color: white;
  transform: scale(1.0);
  z-index: 1; 
}

.circle-btn:active {
  transform: scale(0.8);
}

.circle-btn.specs:hover {
  background-color: #6600ff;
  border-color: #9900ff;
}

.circle-btn.tech:hover {
  background-color: #6600ff;
  border-color: #9900ff;
}

.circle-btn.tg:hover {
  background-color: #0088cc;
  border-color: #006699;
}

.circle-btn.discord:hover {
  background-color: #7289da;
  border-color: #5b6eae;
}

.circle-btn.github:hover {
  background-color: #333;
  border-color: #000;
}

.circle-btn.insta:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  border-color: #d6249f;
  color: white;
}

.circle-btn.tiktok:hover {
  background: radial-gradient(circle at 30% 107%, #69C9D0 0%, #69C9D0 5%, #EE1D52 45%, #EE1D52 60%, #000000 90%);
  border-color: #EE1D52;
  color: white;
}

.circle-btn.youtube:hover {
  background: radial-gradient(circle at 30% 107%, #FF0000 0%, #FF0000 60%, #CC0000 90%);
  border-color: #FF0000;
  color: white;
}

.circle-btn.matrix:hover {
  background-color: #2ecc71;
  border-color: #27ae60;
}

.circle-btn.steam:hover {
  background: linear-gradient(0deg, #171a21 0%, #2a475e 50%, #66c0f4 100%);
  border-color: #66c0f4;
  color: white;
}

.circle-btn.mail:hover {
  background-color: #ea4335;
  border-color: #b1271b;
}


/* === CRT flicker */
@keyframes crt-glow {
  0% {
    text-shadow:
      0 0 2px #6600ff,
      0 0 5px #6600ff,
      0 0 10px #6600ff,
      3px 3px 10px #6600ff;
  }
  100% {
    text-shadow:
      0 0 3px #6600ff,
      0 0 7px #6600ff,
      0 0 14px #6600ff,
      4px 4px 12px #6600ff;
  }
}

@keyframes glitch {
  0% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
  10% { clip-path: inset(10% 0 85% 0); transform: translate(-3px, -2px); }
  20% { clip-path: inset(60% 0 20% 0); transform: translate(2px, 1px); }
  30% { clip-path: inset(30% 0 50% 0); transform: translate(-1px, 2px); }
  40%, 100% { clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

@keyframes glitch-color {
  0% {
    filter: none;
  }
  100% {
    filter: none;
  }
}

.main-title.glitch-active {
  animation: glitch 0.4s steps(2, end), glitch-color 0.4s ease-in-out;
}


/* === submenus */
#tech, #specs {
  position: absolute;
  display: none;
  width: 80%;
  max-height: 50vh;
  padding: 1rem 1.1rem;
  box-shadow: 1.5rem 1.5rem 2rem #000;
  font-size: 17px;
  overflow-y: auto;
  text-align: left;
  scroll-behavior: smooth;
  padding-top: 50px;
  justify-content: start;
}

#tech .title, #specs .title, #tech h1, #specs h1 {
  text-align: left !important;
  justify-content: flex-start !important;
  padding: 0.5rem 0.5rem;
}

/* === layout elements */

.brand-button {
  font-size: 1.2rem;
  padding: 8px 16px;
  margin: 8px 0;
  background: #111;
  color: #fff;
  border: 2px solid #444;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.3s ease;
  font-family: inherit;
  text-decoration: none; /* Disable underline */
}

#copyright {
  text-align: left; 
  font-weight: bold;
  text-wrap: pretty;
  color: #888;
}

#copyright a {
  color: #fff;
  opacity: 0.7;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: #888;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

body.light #copyright a {
  color: #000;
}

.brand-button:hover {
  background: #6600ff;
  color: #fff;
  border-color: #6600ff;
  transform: scale(1.03);
  text-shadow: 0 0 3px #000;
}

body.light .brand-button {
  background: #eee;
  color: #000;
  border-color: #aaa;
}

body.light .brand-button:hover {
  background: #9900ff;
  color: #fff;
  border-color: #9900ff;
}

body.light .circle-btn {
  background: #fff;
  color: #000;
  border-color: #888;
}

.brand-button .arrow {
  float: right;
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

.brand-button.open .arrow {
  transform: rotate(180deg);
}


#phone-list p {
  margin: 1px 0;
  line-height: 1.1;
}
.brand-section { margin-bottom: 2px; }
.brand-header-container {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}
.toggle {
  display: inline-block;
  transition: transform 0.3s ease;
}
.toggle.open { transform: rotate(180deg); }
.phone-list { padding-left: 15px; }
/* #widget, small { margin: 2px; } */

#widget {
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 10px auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Last played song info styling */
.lastfm-info {
  display: block;
  text-align: center;
  font-size: 0.95em;
  font-weight: bold;
}

#song {
  text-align: left;
  line-height: 1.3;
  margin-bottom: 0.3em;
}

.song-link {
  text-decoration: underline;
  color: inherit;
}

.song-name {
  font-weight: 600;
  font-size: 1.1em;
}

.artist-name {
  font-size: 0.9em;
  opacity: 0.8;
  display: block;
}

#status {
  text-align: left;
  font-size: 0.85em;
  opacity: 0.7;
  margin-bottom: 0.5em;
}

body.light .lastfm-info {
  color: #444;
}

/* ====== mobile responsiveness */
@media only screen and (max-width: 600px) {
  .screen, #tech, #specs {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    bottom: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 30px;
    box-sizing: border-box;
    box-shadow: none !important;
    overflow-y: auto !important;
    transform: none !important;
    max-height: 100vh !important;
    height: auto!important;
  }

  a {
    font-size: 20px;
  }

  .circle-btn {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  #song {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .separator {
    display: none;
  }
  .artist-name {
    font-size: 0.9em;
    opacity: 0.8;
  }

  p.line,
  li.line {
    font-size: 18px;
    line-height: 1.2;
  }
 
  .button {
    z-index: 10000 !important;
  }

  .header-image {
    height: 70px !important;
  }

  .main-title {
    font-size: clamp(36px, 10vw, 72px);
    letter-spacing: 1px;
    margin-top: 10px;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    text-decoration-color: #6600ff;
  }

  
}

/* === touch devices */
@media (hover: none) and (pointer: coarse) {
  .perspective-hover {
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
    transition: none !important;
  }

  .perspective-hover:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
  }

  #theme-toggle {
    position: fixed !important;
    bottom: 15px !important;
    right: 15px !important;
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 10px !important;
    background: #444 !important;
    color: #fff !important;
    border: 2px solid #888 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
    transition: none !important;
    max-width: none !important;
    z-index: 9999 !important;
    text-align: center;
  }

  #theme-toggle:hover {
    transform: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    background: #444 !important;
    color: #fff !important;
    border-color: #888 !important;
  }

  #theme-label {
    display: none !important;
  }

  #theme-icon {
    font-size: 22px !important;
    pointer-events: none !important;
  }
}

/* === desktop responsiveness */
@media (min-width: 601px) {
  #tech, #specs {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    min-width: 500px;
    padding: 1.5rem 2rem;
  }
}

body.light {
  background: #f0f0f0;
  color: #111;
}

body.light .screen,
body.light #specs,
body.light #tech {
  background: rgba(255, 255, 255, 0.7); /* ← PRZEZROCZYSTE TŁO */
  border-color: #aaa;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px); /* ← dodaj dla pewności */
  -webkit-backdrop-filter: blur(10px);
}


body.light a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  text-decoration-color: #6600ff;
}
body.light a:hover {
  color: #000;
  text-shadow: 0 0 5px #000;
  text-decoration-color: #6600ff;
}

body.light .status-dot {
  box-shadow: 0 0 3px #00000060;
}

body.light .button {
  background: #ccc;
  color: #000;
  border-color: #aaa;
}
body.light .button:hover {
  background: #fff;
  color: #111;
}

body.light .perspective-hover:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  filter: brightness(1.1) drop-shadow(0 0 8px rgba(0, 0, 0, 0.4)) !important;
}

body.theme-transition {
  transition: background-color 0.5s ease, color 0.5s ease;
}


#theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10010;
  font-size: 16px;
  padding: 6px 10px;
  background: #333;
  color: #fff;
  border: 2px solid #888;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;

  width: 42px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.35s ease;
  transform-origin: right center;
}

#theme-toggle:hover {
  width: 145px;
  transform: scale(1.05);
  background: #fff;
  color: #000;
  border-color: #444;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

#theme-icon {
  transition: transform 0.5s ease;
}
#theme-icon.rotating {
  transform: rotate(360deg);
}

#theme-label {
  font-family: monospace;
  font-weight: bold;
  overflow: hidden;
  opacity: 0;
  width: 0;
  display: inline-block;
  transform: translateX(-8px);
  transition:
    opacity 0.3s ease 0.05s,
    width 0.2s ease 0.1s,
    transform 0.3s ease;
}

#theme-toggle:hover #theme-label {
  opacity: 1;
  width: auto;
  transform: translateX(0);
}

body.light #theme-toggle {
  background: #ddd;
  color: #111;
  border-color: #aaa;
}

body.light #theme-toggle:hover {
  background: #000;
  color: #fff;
}

.glitch-text {
  animation: glitchText 0.5s steps(10) forwards;
}


.perspective-hover {
  position: relative;
  z-index: 1;
}

.perspective-hover::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: inherit;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
  z-index: -1;
  pointer-events: none;
}

body.light .perspective-hover::before {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}