* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive;
  background: #0a2f3f;
  min-height: 100vh;
  overflow-x: hidden;
}

:root {
  --accent: #ff6b35;
  --text-color: #1a1a2e;
  --link-color: #00bcd4;
  --bg-pattern: none;
  --profile-font: 'Comic Neue', 'Comic Sans MS', cursive;
}

/* Web 2.0 glossy header */
.header-glossy {
  background: linear-gradient(180deg, #1de9b6 0%, #00897b 40%, #004d40 100%);
  border-bottom: 3px solid #00e5ff;
  box-shadow: 0 4px 20px rgba(0,229,255,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
}

.header-glossy::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.logo-text {
  font-family: 'Bungee Shade', cursive;
  background: linear-gradient(180deg, #b2fff9 0%, #00e5ff 30%, #ffffff 50%, #00e5ff 70%, #004d40 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  font-size: 2.5rem;
  letter-spacing: 2px;
}

.nav-tab {
  background: linear-gradient(180deg, #e0f7fa 0%, #80deea 50%, #4dd0e1 100%);
  border: 2px solid #00838f;
  border-radius: 8px 8px 0 0;
  padding: 6px 16px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  color: #004d40;
  cursor: pointer;
  font-size: 0.85rem;
  position: relative;
  transition: all 0.15s;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 4px rgba(0,0,0,0.2);
}

.nav-tab:hover, .nav-tab.active {
  background: linear-gradient(180deg, #ffffff 0%, #b2ebf2 50%, #80deea 100%);
  transform: translateY(-2px);
}

.nav-tab.active {
  border-bottom-color: transparent;
}

.blink-new {
  animation: blinker 1s step-end infinite;
  color: #ff1744;
  font-size: 0.65rem;
  font-weight: 900;
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffff00;
  border: 1px solid #ff1744;
  border-radius: 3px;
  padding: 1px 4px;
}

@keyframes blinker {
  50% { opacity: 0; }
}

/* Profile frame */
.profile-frame {
  border: 4px solid #00bcd4;
  border-radius: 8px;
  box-shadow: 4px 4px 0 #004d40, 0 0 20px rgba(0,229,255,0.3);
  overflow: hidden;
  background: #0a1628;
}

/* MySpace-style content boxes */
.myspace-box {
  border: 2px solid #00838f;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,0.95);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.myspace-box-header {
  background: linear-gradient(180deg, #26c6da, #00838f);
  color: white;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.85rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.myspace-box-content {
  padding: 10px;
  font-family: var(--profile-font);
  color: var(--text-color);
}

/* Marquee */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-text {
  display: inline-block;
  animation: marquee 12s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Sparkle cursor trail */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  animation: sparkle-fade 0.8s ease-out forwards;
  font-size: 14px;
}

@keyframes sparkle-fade {
  0% { opacity: 1; transform: scale(1) rotate(0deg); }
  100% { opacity: 0; transform: scale(0) rotate(180deg) translateY(-30px); }
}

/* Floating otter animation */
.otter-float {
  animation: otter-bob 3s ease-in-out infinite;
}

@keyframes otter-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Wave animation */
.wave-bg {
  position: relative;
  overflow: hidden;
}

.wave-bg::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: -50%;
  width: 200%;
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 50px,
    rgba(0,229,255,0.1) 50px,
    rgba(0,229,255,0.1) 100px
  );
  animation: wave-move 4s linear infinite;
}

@keyframes wave-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(100px); }
}

/* Fish fly animation */
.fish-fly {
  position: fixed;
  font-size: 2rem;
  z-index: 99998;
  pointer-events: none;
  animation: fish-arc 1.5s ease-out forwards;
}

@keyframes fish-arc {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(150px, -200px) rotate(180deg) scale(1.5); }
  100% { opacity: 0; transform: translate(300px, -50px) rotate(360deg) scale(0.5); }
}

/* Online dot pulse */
.online-dot {
  width: 10px;
  height: 10px;
  background: #00e676;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px #00e676;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

/* Beveled button */
.bevel-btn {
  background: linear-gradient(180deg, #ffab40 0%, #ff6d00 50%, #e65100 100%);
  border: 2px outset #ffcc02;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  font-family: 'Comic Neue', cursive;
  padding: 8px 16px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.1s;
}

.bevel-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.bevel-btn:active {
  transform: translateY(1px);
  border-style: inset;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Tiled backgrounds */
.bg-water-ripples {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='20' fill='none' stroke='%2300838f' stroke-width='0.5' opacity='0.3'/%3E%3Ccircle cx='30' cy='30' r='10' fill='none' stroke='%2300bcd4' stroke-width='0.5' opacity='0.2'/%3E%3C/svg%3E");
}

.bg-fish {
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='10' y='25' font-size='16' opacity='0.15'%3E🐟%3C/text%3E%3C/svg%3E");
}

.bg-seashells {
  background-image: url("data:image/svg+xml,%3Csvg width='50' height='50' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='10' y='30' font-size='18' opacity='0.12'%3E🐚%3C/text%3E%3C/svg%3E");
}

.bg-starry {
  background-image: url("data:image/svg+xml,%3Csvg width='50' height='50' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='5' y='15' font-size='8' opacity='0.2'%3E⭐%3C/text%3E%3Ctext x='30' y='40' font-size='6' opacity='0.15'%3E✨%3C/text%3E%3C/svg%3E");
}

.bg-kelp {
  background-image: url("data:image/svg+xml,%3Csvg width='30' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 60 Q10 40 15 20 Q20 0 15 -10' fill='none' stroke='%232e7d32' stroke-width='2' opacity='0.15'/%3E%3C/svg%3E");
}

/* Comment styling */
.comment-item {
  border-bottom: 1px dashed #b2dfdb;
  padding: 8px 0;
}

.comment-item:last-child {
  border-bottom: none;
}

/* Top 8 grid card */
.top8-card {
  border: 2px solid #00838f;
  border-radius: 4px;
  background: linear-gradient(180deg, #e0f7fa, #b2ebf2);
  padding: 6px;
  text-align: center;
  transition: transform 0.2s;
  cursor: pointer;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.15);
}

.top8-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,229,255,0.3);
}

/* Interest tags */
.interest-tag {
  display: inline-block;
  background: linear-gradient(135deg, #00bcd4, #009688);
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin: 2px;
  font-weight: 700;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

/* Audio player mock */
.audio-player-mock {
  background: linear-gradient(180deg, #263238, #37474f);
  border: 2px inset #546e7a;
  border-radius: 6px;
  padding: 8px 12px;
  color: #00e5ff;
  font-family: 'Comic Neue', monospace;
}

.scrubber-track {
  height: 6px;
  background: #37474f;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  border: 1px inset #455a64;
}

.scrubber-fill {
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #1de9b6);
  border-radius: 3px;
  animation: scrub-play 8s linear infinite;
}

@keyframes scrub-play {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Visitor counter */
.visitor-counter {
  background: #000;
  color: #00ff00;
  font-family: 'Courier New', monospace;
  padding: 4px 12px;
  border: 2px inset #333;
  display: inline-block;
  border-radius: 2px;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* Footer */
.otter-footer {
  background: linear-gradient(180deg, #004d40, #00251a);
  border-top: 3px solid #1de9b6;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a2f3f; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00bcd4, #00838f); border-radius: 5px; }

/* Edit mode inputs */
.edit-input {
  background: #e0f7fa;
  border: 2px inset #00838f;
  padding: 6px 10px;
  font-family: 'Comic Neue', cursive;
  border-radius: 4px;
  width: 100%;
  font-size: 0.9rem;
}

.edit-input:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0,229,255,0.4);
}

.edit-textarea {
  background: #e0f7fa;
  border: 2px inset #00838f;
  padding: 8px 10px;
  font-family: 'Comic Neue', cursive;
  border-radius: 4px;
  width: 100%;
  min-height: 80px;
  font-size: 0.9rem;
  resize: vertical;
}

/* Color picker */
.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid white;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.15s;
}

.color-swatch:hover {
  transform: scale(1.2);
}

.color-swatch.selected {
  border-color: #ffff00;
  box-shadow: 0 0 12px rgba(255,255,0,0.5);
}

/* Fact popup */
.fact-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #004d40, #00695c);
  border: 4px solid #1de9b6;
  border-radius: 16px;
  padding: 24px;
  z-index: 10000;
  max-width: 400px;
  color: white;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(29,233,182,0.2);
  animation: popup-in 0.3s ease-out;
}

@keyframes popup-in {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Loading avatar */
.avatar-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a2f3f, #004d40);
  color: #00e5ff;
  font-size: 3rem;
  animation: otter-bob 2s ease-in-out infinite;
}

/* Background overlay for patterns */
.profile-bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-repeat: repeat;
}

@media (max-width: 768px) {
  .logo-text {
    font-size: 1.5rem;
  }
  .nav-tab {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
}