* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(0, 255, 136, 0.08) 0%, transparent 50%);
  z-index: 0;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

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

.flip-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 450px;
  perspective: 1000px;
  height: 490px;
  margin: 0 auto;
}

.card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 18px;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: rgba(10, 10, 10, 0.2);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 20px 60px rgba(0, 255, 136, 0.3), 0 0 0 1px rgba(0, 255, 136, 0.1) inset, inset 0 0 50px
    rgba(0, 255, 136, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-front {
  justify-content: space-between;
}

.card-back {
  transform: rotateY(180deg);
  overflow: hidden;
}

.back-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.section {
  margin-bottom: 0;
  width: 100%;
}

.section > *:not(.section-title) {
  margin-top: 10px;
}

.flip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.3s;
  color: #00ff88;
  backdrop-filter: blur(20px);
}

.flip-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.flip-btn svg {
  width: 20px;
  height: 20px;
  fill: #00ff88;
  transition: transform 0.3s;
}

.card.flipped .flip-btn svg {
  transform: rotate(180deg);
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  margin-top: 5px;
}

.name-title {
  text-align: center;
}

.name {
  font-size: 32px;
  font-weight: bold;
  color: #00ff88;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.5), 0 0 40px rgba(0, 255, 136, 0.3);
  margin-bottom: -5px;
  font-family: "Irish Grover", cursive;
  letter-spacing: 1px;
}

.title {
  font-size: 16px;
  color: #ccc;
  font-weight: 500;
  text-align: center;
  margin-bottom: -15px;
}

.status {
  font-size: 14px;
  color: #888;
  min-height: 20px;
  margin-bottom: 8px;
  text-align: center;
  font-style: italic;
  margin-top: -5px;
}

.status::after {
  content: "|";
  animation: blink 1s infinite;
  margin-left: 2px;
}

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

.music-player {
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin: 2px 0;
  position: relative;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
  padding-right: 35px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.play-btn {
  background: linear-gradient(135deg, #00ff88, #00cc70);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 255, 136, 0.5);
}

.play-btn svg {
  width: 13px;
  height: 13px;
  fill: #0a0a0a;
}

.music-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.song-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-right: 0;
}

.music-player.volume-expanded .song-name {
  padding-right: 85px;
}

.progress-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-player.volume-expanded .progress-container {
  width: calc(100% - 48px);
  margin-right: 48px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00cc70);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #888;
  margin-top: 3px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-display #duration {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-player.volume-expanded .time-display #duration {
  transform: translateX(-48px);
}

.volume-area {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.volume-icon-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  background: rgba(20, 20, 20, 0.5);
  border: none;
  border-radius: 6px;
  padding: 6px;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.volume-area.expanded .volume-icon-container {
  transform: translateX(-50px);
}

.volume-icon-container:hover {
  background: rgba(20, 20, 20, 0.7);
}

.volume-icon {
  width: 16px;
  height: 16px;
  fill: #00ff88;
}

.volume-control {
  position: absolute;
  right: 0;
  opacity: 0;
  width: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: rgba(20, 20, 20, 0.5);
  border: none;
  border-radius: 6px;
  padding: 6px;
  backdrop-filter: blur(20px);
}

.volume-area.expanded .volume-control {
  opacity: 1;
  width: 60px;
  pointer-events: all;
  transform: translateX(8px);
}

.volume-slider-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.volume-slider-container:hover {
  background: rgba(255, 255, 255, 0.2);
}

.volume-slider-bar {
  width: 100%;
  height: 100%;
  position: relative;
}

.volume-slider-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00cc70);
  border-radius: 2px;
  width: 80%;
  transition: width 0.15s ease;
}

.volume-slider-container:hover .volume-slider-fill {
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}

.links {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 2px 0;
}

.link-btn {
  flex: 1;
  padding: 10px;
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
  backdrop-filter: blur(20px);
}

.link-btn:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: #00ff88;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

.link-icon {
  width: 18px;
  height: 18px;
}

.link-text {
  font-size: 10px;
  font-weight: 600;
}

.quote {
  text-align: center;
  margin-top: 8px;
  padding: 10px;
  background: rgba(0, 255, 136, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 136, 0.1);
  animation: quoteGlow 4s ease-in-out infinite;
  backdrop-filter: blur(10px);
}

.quote-text {
  font-size: 12px;
  color: #ccc;
  font-style: italic;
  line-height: 1.4;
  margin: 0;
}

@keyframes quoteGlow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
  }
}

.offer {
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin: 2px 0;
  text-align: center;
  backdrop-filter: blur(20px);
}

.offer-text {
  font-size: 13px;
  color: #ccc;
  margin-bottom: 10px;
  line-height: 1.4;
}

.order-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  color: #00ff88;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.order-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.order-btn svg {
  width: 14px;
  height: 14px;
  fill: #00ff88;
}

.section-title {
  font-size: 18px;
  color: #00ff88;
  margin-bottom: 12px;
  margin-top: 0;
  text-align: center;
  font-family: "Irish Grover", cursive;
  line-height: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 0;
  margin-top: 0;
}

.stack-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 0;
  margin-top: 0;
}

.stack-item {
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.stack-item:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: #00ff88;
  transform: translateY(-2px);
}

.stat-item {
  text-align: center;
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  padding: 12px 8px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.stat-item:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: #00ff88;
  transform: translateY(-2px);
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: #00ff88;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 10px;
  color: #ccc;
}

.project-small {
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: auto;
  margin-top: 0;
  backdrop-filter: blur(10px);
}

.project-title-small {
  font-size: 15px;
  color: #00ff88;
  margin: 0;
  text-align: center;
  font-weight: 600;
}

.project-description-small {
  font-size: 11px;
  color: #ccc;
  line-height: 1.4;
  margin: 0;
  text-align: center;
  flex: 1;
}

.project-btn-small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  text-decoration: none;
  color: #00ff88;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s;
  margin: 0 auto;
  width: fit-content;
}

.project-btn-small:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 255, 136, 0.3);
}

.project-btn-small svg {
  width: 12px;
  height: 12px;
  fill: #00ff88;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(9px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

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

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 255, 136, 0.2);
  border-left: 4px solid #00ff88;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

@supports (-webkit-touch-callout: none) {
  /* iOS Safari */
  body {
    min-height: -webkit-fill-available;
  }
  
  .flip-container {
    -webkit-transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
  }
  
  .card {
    -webkit-transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
  }
  
  .card-front,
  .card-back {
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    will-change: transform;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (min-width: 1200px) {
  .flip-container {
    height: 500px;
    max-width: 450px;
  }

  .card-back {
    padding: 25px;
  }

  .back-content {
    gap: 22px;
    justify-content: center;
  }

  .section-title {
    font-size: 19px;
    margin-bottom: 12px;
  }

  .stats {
    gap: 10px;
  }

  .stat-item {
    padding: 10px 7px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stack-list {
    gap: 10px;
  }

  .stack-item {
    padding: 9px;
    font-size: 12px;
  }

  .project-small {
    padding: 11px;
    gap: 7px;
  }

  .project-title-small {
    font-size: 15px;
  }

  .project-description-small {
    font-size: 11px;
  }
}

@media (min-width: 1400px) {
  .flip-container {
    height: 510px;
  }

  .card-back {
    padding: 28px;
  }

  .back-content {
    gap: 24px;
  }

  .section-title {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .stats {
    gap: 11px;
  }

  .stat-item {
    padding: 11px 8px;
  }

  .stat-value {
    font-size: 21px;
  }

  .stack-list {
    gap: 11px;
  }

  .stack-item {
    padding: 10px;
    font-size: 12px;
  }

  .project-small {
    padding: 12px;
    gap: 8px;
  }

  .project-title-small {
    font-size: 16px;
  }

  .project-description-small {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .flip-container {
    height: 440px;
    max-width: 380px;
  }

  .card-front,
  .card-back {
    padding: 15px;
  }

  .order-btn {
    padding: 8px 12px;
    font-size: 11px;
  }

  .profile-header {
    margin-top: 5px;
    margin-bottom: -5px;
  }

  .name {
    font-size: 26px;
    margin-bottom: -8px;
  }

  .title {
    font-size: 14px;
    margin-bottom: -12px;
  }

  .status {
    font-size: 12px;
    margin-top: -2px;
    margin-bottom: 2px;
  }

  .music-player {
    padding: 10px;
    margin: 1px 0;
  }

  .song-name {
    font-size: 11px;
  }

  .links {
    gap: 6px;
    margin: 1px 0;
  }

  .link-btn {
    padding: 8px;
  }

  .offer {
    padding: 10px;
    margin: 1px 0;
  }

  .quote {
    margin-top: 4px;
    padding: 8px;
  }

  .back-content {
    gap: 20px;
    justify-content: center;
    padding: 20px 0 15px 0;
  }

  .section-title {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .stats {
    gap: 8px;
  }

  .stat-item {
    padding: 10px 6px;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 9px;
  }

  .stack-list {
    gap: 8px;
  }

  .stack-item {
    padding: 8px;
    font-size: 11px;
  }

  .project-small {
    padding: 10px;
    gap: 7px;
  }

  .project-title-small {
    font-size: 14px;
  }

  .project-description-small {
    font-size: 10px;
  }

  .volume-area.expanded .volume-icon-container {
    transform: translateX(-54px);
  }

  .music-player.volume-expanded .progress-container {
    width: calc(100% - 54px);
    margin-right: 54px;
  }

  .music-player.volume-expanded .time-display #duration {
    transform: translateX(-54px);
  }

  .volume-area.expanded .volume-control {
    transform: translateX(4px);
  }
}

@media (max-width: 480px) {
  .flip-container {
    height: 420px;
    max-width: 340px;
  }

  .card-front,
  .card-back {
    padding: 12px;
  }

  .order-btn {
    padding: 7px 10px;
    font-size: 10px;
  }

  .profile-header {
    margin-top: 0;
    margin-bottom: -8px;
  }

  .name {
    font-size: 24px;
    margin-bottom: -10px;
  }

  .title {
    font-size: 13px;
    margin-bottom: -14px;
  }

  .status {
    font-size: 11px;
    margin-top: -4px;
    margin-bottom: 0;
  }

  .music-player {
    padding: 8px;
    margin: 0;
  }

  .song-name {
    font-size: 10px;
  }

  .links {
    gap: 5px;
    margin: 0;
  }

  .link-btn {
    padding: 7px;
  }

  .offer {
    padding: 8px;
    margin: 0;
  }

  .quote {
    margin-top: 2px;
    padding: 7px;
  }

  .back-content {
    gap: 18px;
    justify-content: center;
    padding: 35px 0 20px 0;
  }

  .section {
    margin-bottom: 0;
  }

  .section:nth-child(2) {
    margin-top: 4px;
  }

  .section:nth-child(3) {
    margin-top: 6px;
  }

  .section-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .stats {
    gap: 6px;
  }

  .stat-item {
    padding: 8px 5px;
  }

  .stat-value {
    font-size: 16px;
  }

  .stat-label {
    font-size: 8px;
  }

  .stack-list {
    gap: 6px;
  }

  .stack-item {
    padding: 7px;
    font-size: 10px;
  }

  .project-small {
    padding: 9px;
    gap: 6px;
  }

  .project-title-small {
    font-size: 13px;
  }

  .project-description-small {
    font-size: 9px;
  }

  .volume-area.expanded .volume-icon-container {
    transform: translateX(-44px);
  }

  .music-player.volume-expanded .progress-container {
    width: calc(100% - 40px);
    margin-right: 44px;
  }

  .music-player.volume-expanded .time-display #duration {
    transform: translateX(-40px);
  }

  .volume-area.expanded .volume-control {
    transform: translateX(4px);
    width: 48px;
  }

  .volume-area {
    right: 8px;
  }
}

@media (max-width: 360px) {
  .flip-container {
    height: 400px;
    max-width: 300px;
  }

  .card-front,
  .card-back {
    padding: 10px;
  }

  .order-btn {
    padding: 6px 8px;
    font-size: 9px;
  }

  .back-content {
    gap: 16px;
    padding: 30px 0 25px 0;
  }

  .section-title {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .stats {
    gap: 5px;
  }

  .stat-item {
    padding: 7px 4px;
  }

  .stat-value {
    font-size: 15px;
  }

  .stack-item {
    font-size: 9px;
    padding: 6px;
  }

  .project-title-small {
    font-size: 12px;
  }

  .project-description-small {
    font-size: 8px;
  }

  .volume-area.expanded .volume-icon-container {
    transform: translateX(-52px);
  }

  .music-player.volume-expanded .progress-container {
    width: calc(100% - 52px);
    margin-right: 52px;
  }

  .music-player.volume-expanded .time-display #duration {
    transform: translateX(-52px);
  }

  .volume-area.expanded .volume-control {
    transform: translateX(2px);
    width: 48px;
  }

  .volume-area {
    right: 8px;
  }
}
