/* ============================================================
   PAPERPIXEL PORTFOLIO — Scrapbook & Pixel Theme Styles
   File: pixel-theme.css
   Author: ImajikoStudio
   Version: 1.0.0
============================================================ */

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-base);
  border-left: var(--border-width) solid var(--color-border);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-bg-surface);
  border: var(--border-width) solid var(--color-border);
  box-shadow: 2px 2px 0 var(--color-border);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-accent-peach);
}

/* ============================================================
   PIXEL BOX UTILITY
   ============================================================ */
.pixel-box {
  border: var(--border-width) solid var(--color-border);
  box-shadow: var(--shadow-md);
  background-color: var(--color-bg-surface);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pixel-box--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   SCRAPBOOK TAPE (SELOTIP EFFECT)
   ============================================================ */
.tape {
  position: absolute;
  height: 24px;
  background-color: rgba(244, 162, 97, 0.6); /* Semi-transparent warm orange */
  border-left: 2px dashed rgba(43, 45, 66, 0.4);
  border-right: 2px dashed rgba(43, 45, 66, 0.4);
  transform: rotate(-3deg);
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tape--blue {
  background-color: rgba(88, 135, 255, 0.5);
  transform: rotate(4deg);
}

.tape--green {
  background-color: rgba(138, 201, 38, 0.5);
  transform: rotate(-5deg);
}

.tape--top-center {
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 100px;
}

.tape--top-left {
  top: -12px;
  left: 10px;
  transform: rotate(-15deg);
  width: 80px;
}

.tape--top-right {
  top: -12px;
  right: 10px;
  transform: rotate(15deg);
  width: 80px;
}

/* ============================================================
   POLAROID CARD
   ============================================================ */
.polaroid {
  background-color: #ffffff;
  padding: 16px 16px 28px 16px;
  border: var(--border-width) solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: inline-block;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  transform: rotate(var(--polaroid-tilt, -1deg));
  position: relative;
  z-index: 1;
}

.polaroid__image-wrapper {
  background-color: #eee;
  border: var(--border-width) solid var(--color-border);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
}

.polaroid__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.1) contrast(0.95);
  transition: transform var(--transition-normal);
}

.polaroid__caption {
  margin-top: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  text-align: center;
  font-size: var(--text-sm);
  color: #2b2d42; /* keep readable ink color */
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.03) translateY(-4px);
  box-shadow: var(--shadow-lg);
  z-index: 5;
}

.polaroid:hover .polaroid__image {
  transform: scale(1.05);
}

/* ============================================================
   STICKY NOTE (MEMO PAPER)
   ============================================================ */
.sticky-note {
  background-color: #fff9db; /* soft sticky note yellow */
  border: var(--border-width) solid var(--color-border);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-md);
  transform: rotate(var(--note-tilt, 1deg));
  background-image: linear-gradient(rgba(43, 45, 66, 0.08) 1px, transparent 1px);
  background-size: 100% 24px;
  line-height: 24px;
  padding-top: 36px;
  color: #2b2d42; /* pencil/ink primary */
}

.sticky-note--blue {
  background-color: #e8f4fd;
}

.sticky-note--peach {
  background-color: #ffeef0;
}

.sticky-note__clip {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b2d42'><path d='M19 10h-2v3h-2v-3h-2v7h-2v-7H9v11H7V10H5v12h14V10zM12 2a4 4 0 0 0-4 4h8a4 4 0 0 0-4-4z'/></svg>");
  background-repeat: no-repeat;
  z-index: 5;
}

/* ============================================================
   PAPER TIMELINE (STITCHED LOOK)
   ============================================================ */
.timeline-dashed {
  position: relative;
  padding-left: 32px;
}

.timeline-dashed::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed var(--color-border);
}

.timeline-dashed__item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-dashed__item:last-child {
  margin-bottom: 0;
}

.timeline-dashed__marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 20px;
  height: 20px;
  background-color: var(--color-bg-base);
  border: var(--border-width) solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dashed__marker::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-peach);
  border-radius: 50%;
}

.timeline-dashed__item:hover .timeline-dashed__marker::after {
  background-color: var(--color-accent-blue);
  transform: scale(1.2);
}

/* ============================================================
   XP PROGRESS BAR (SIMPLE STICKER DESIGN)
   ============================================================ */
.xp-bar {
  margin-bottom: 24px;
}

.xp-bar__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
}

.xp-bar__level {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  background-color: var(--color-accent-green);
  padding: 4px 8px;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-sm);
  color: var(--color-text-primary);
}

.xp-bar__track {
  height: 16px;
  background-color: var(--color-bg-base);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
}

.xp-bar__fill {
  height: 100%;
  background-color: var(--color-accent-blue);
  width: 0%; /* Animated on scroll via JS */
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.xp-bar__fill--green { background-color: var(--color-accent-green); }
.xp-bar__fill--peach { background-color: var(--color-accent-peach); }
.xp-bar__fill--purple { background-color: var(--color-accent-purple); }

/* ============================================================
   ACHIEVEMENT BADGES (STICKER TILES)
   ============================================================ */
.achievement-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius);
  background-color: var(--color-bg-surface);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.achievement-badge:hover {
  transform: translateY(-2px) rotate(1deg);
  box-shadow: var(--shadow-md);
}

.achievement-badge__icon {
  font-size: var(--text-2xl);
  width: 50px;
  height: 50px;
  background-color: var(--color-bg-raised);
  border: var(--border-width) solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-badge__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.achievement-badge__title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.achievement-badge__desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.achievement-badge__rarity {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  padding: 4px 6px;
  border: 1px solid var(--color-border);
  background-color: var(--color-accent-purple);
  color: var(--color-text-inverse);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  right: 8px;
}

/* ============================================================
   INTERACTIVE MINI MUSIC PLAYER (SCRAPBOOK WIDGET)
   ============================================================ */
.music-player {
  background-color: var(--color-bg-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-md);
  max-width: 320px;
  position: relative;
}

.music-player__disc {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: var(--border-width) solid var(--color-border);
  background: radial-gradient(circle, #555 40%, #111 41%, #111 80%, var(--color-accent-blue) 81%);
  animation: spin 3s linear infinite;
  animation-play-state: paused;
}

.music-player--playing .music-player__disc {
  animation-play-state: running;
}

.music-player__info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.music-player__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.music-player__artist {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.music-player__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-player__btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-text-primary);
  transition: transform var(--transition-fast);
}

.music-player__btn:hover {
  transform: scale(1.2);
}

/* ============================================================
   DRAGGABLE STICKER UTILITY
   ============================================================ */
.draggable-sticker {
  cursor: grab;
  position: absolute;
  user-select: none;
  z-index: 100;
  touch-action: none;
}

.draggable-sticker:active {
  cursor: grabbing;
}
