/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 14px;
    background: linear-gradient(45deg, #000454, #1a0033);
    background-attachment: fixed;
    color: #00ff00;
    min-height: 100vh;
    line-height: 1.4;
}

/* CSS Variables */
:root {
    --neon-green: #00ff00;
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-purple: #9900ff;
    --electric-blue: #0080ff;
    --bright-yellow: #ffff00;
    --neon-orange: #ff8000;
    --dark-purple: #1a0033;
    --deep-black: #000000;
}

/* Animations */
@keyframes blink {
    0%, 70% { opacity: 1; }
    71%, 100% { opacity: 0.3; }
}

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

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes rainbow {
      0%    { color: #ff0055; }   /* Neon pink */
      16%   { color: #ff9900; }   /* Electric orange */
      33%   { color: #ffe600; }   /* Acid yellow */
      50%   { color: #00fff7; }   /* Neon cyan */
      66%   { color: #0080ff; }   /* Electric blue */
      83%   { color: #cc00ff; }   /* Hyper purple */
      100%  { color: #9900ff; }   /* Loop back to neon pink */
  }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px currentColor; }
    50% { box-shadow: 0 0 20px currentColor, 0 0 30px currentColor; }
}

/* Utility Classes */
.animate-blink { animation: blink 1s linear infinite; }
.animate-scroll { animation: scroll 10s linear infinite; }
.animate-glitch { animation: glitch 0.3s ease-in-out infinite; }
.animate-rainbow { animation: rainbow 3s ease-in-out infinite alternate; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }

.text-neon-green { color: var(--neon-green); }
.text-neon-pink { color: var(--neon-pink); }
.text-neon-cyan { color: var(--neon-cyan); }
.text-neon-purple { color: var(--neon-purple); }
.text-electric-blue { color: var(--electric-blue); }
.text-bright-yellow { color: var(--bright-yellow); }
.text-neon-orange { color: var(--neon-orange); }

.bg-neon-green { background-color: var(--neon-green); }
.bg-neon-pink { background-color: var(--neon-pink); }
.bg-neon-cyan { background-color: var(--neon-cyan); }
.bg-bright-yellow { background-color: var(--bright-yellow); }
.bg-dark-purple { background-color: var(--dark-purple); }
.bg-deep-black { background-color: var(--deep-black); }

.neon-glow {
    text-shadow: 0 0 3px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
}

/* Layout Components */
.matrix-bg {
    background-image: 
        radial-gradient(circle at 25% 25%, var(--neon-green) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, var(--neon-pink) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: scroll 20s linear infinite;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    pointer-events: none;
}

.main-container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--deep-black);
    border: 4px solid var(--neon-green);
    min-height: 100vh;
}

.retro-border {
    border: 5px solid;
    border-color: var(--neon-green) var(--neon-pink) var(--neon-cyan) var(--bright-yellow);
}

.pixel-button {
    background: linear-gradient(45deg, var(--neon-green), var(--neon-pink));
    border: 2px solid #ffffff;
    text-shadow: 1px 1px 0px #000000;
    box-shadow: 0 0 10px var(--neon-green);
    color: var(--deep-black);
    font-weight: bold;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
}

.pixel-button:hover {
    animation: glitch 0.3s ease-in-out infinite;
}

/* Header */
header {
    background-color: var(--dark-purple);
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.scrolling-text {
    overflow: hidden;
    white-space: nowrap;
}

.scrolling-text div {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

/* Navigation */
nav {
    background-color: var(--neon-purple);
    border-bottom: 4px solid var(--neon-cyan);
    padding: 10px;
    text-align: center;
}

nav button {
    margin: 5px;
}

nav button.active {
    animation: glitch 0.3s ease-in-out infinite;
}

/* Main Content */
main {
    padding: 20px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.content-box {
    background-color: var(--dark-purple);
    padding: 20px;
    margin-bottom: 20px;
}

.content-box h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
}

.content-box h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.content-box img {
    width: 100%;
    height: auto;
    border: 2px solid var(--neon-green);
    margin-bottom: 10px;
}

.pixel-art {
    image-rendering: pixelated;
    filter: contrast(1.2) saturate(1.3);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--neon-green);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background-color: var(--deep-black);
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    padding: 8px;
    font-family: inherit;
    font-size: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    animation: pulse-glow 2s ease-in-out infinite;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    padding: 15px;
    text-align: center;
    border: 3px solid;
    font-weight: bold;
    min-width: 160px;
}

.stat-number {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
}

/* Footer */
footer {
    background-color: var(--dark-purple);
    padding: 20px;
    text-align: center;
    border-top: 4px solid var(--neon-green);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

/* Media Queries */
@media (max-width: 768px) {
    .main-container {
        border-width: 2px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .pixel-button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    main {
        padding: 15px;
    }
}

/* Guestbook Styles */
.guestbook-entry {
    border: 2px solid var(--neon-cyan);
    padding: 15px;
    margin-bottom: 15px;
    background-color: rgba(0, 255, 255, 0.1);
}

.guestbook-entry:hover {
    animation: pulse-glow 2s ease-in-out infinite;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.entry-name {
    color: var(--neon-pink);
    font-weight: bold;
}

.entry-website {
    color: var(--neon-green);
    font-size: 0.8rem;
    text-decoration: none;
}

.entry-website:hover {
    animation: glitch 0.3s ease-in-out infinite;
}

.entry-date {
    color: var(--neon-cyan);
    font-size: 0.8rem;
}

.entry-message {
    color: var(--neon-green);
    font-size: 0.9rem;
}

/* Music Section */
.now-playing {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid var(--neon-green);
    margin-bottom: 15px;
}

.now-playing img {
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-pink);
}

.track-info h4 {
    color: var(--neon-pink);
    margin-bottom: 5px;
}

.track-info p {
    color: var(--neon-green);
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.track-status {
    color: var(--bright-yellow);
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .now-playing {
        flex-direction: column;
        text-align: center;
    }
    
    .entry-header {
        flex-direction: column;
        gap: 5px;
    }
}
/* Custom picture caption */
.photopile { 
  display: flex; 
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.photopile figure {
  display: inline-block;
  background: white;
  box-shadow: 1px 4px 5px rgba(0,0,0,0.55);
  transform: rotate(2deg);
  margin: 20px -10px;
  width: 180px;
  padding-bottom: 10px;
}
.photopile figure img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  margin: 1rem auto 0 auto;
  display: block;
  border: 2px rgb(0,0,0,0.55) inset;
}
.photopile figcaption, .popovers figcaption {
  font-family: 'Courier New', 'Monaco', monospace;
  text-align: center;
  margin: 0.5rem 1rem 1rem 1rem;
  font-size: 1rem;
  color: black;
}
.photopile button { 
  background: none; 
  border: none;
  max-width: 40%;
}
.photopile button:hover, .photopile button:focus { 
  z-index: 3;
  cursor:pointer;
}
.photopile button:nth-child(2n) { 
  transform: rotate(-10deg);
}
.photopile button:nth-child(3n) {
  transform: rotate(5deg);
}
.photopile button:nth-child(4n) { 
  transform: rotate(4deg);
}
.photopile button:nth-child(5n) { 
  transform: rotate(-2deg);
}
.photopile button:nth-child(6n) {
  transform: rotate(-7deg);
}
:popover-open {
  border: none;
  box-shadow: 1px 4px 5px rgba(0,0,0,0.55);
  position: fixed;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%,-50%);
}
.popovers figure:popover-open {
  display: block;
  background: white;
  width: 88vmin;
}
.popovers figure:popover-open figcaption {
  margin: 2.5vmin 1rem 4vmin 1rem;
  font-size: 175%;
  color: black;
}
.popovers figure:popover-open img {
  margin: 4vmin 4vmin 0 4vmin;
  width: 80vmin;
  border: 4px rgb(0,0,0,0.55) inset;
}
.imgtxt:hover span, .imgtxt:focus span {
  opacity: 1;
}
.imgtxt:hover img, .imgtxt:focus img {
  /* add hover effects like transform or filter to your images here! */
}

/* Micro Ads Bulletin Board Styles */
.micro-ads-bulletin {
  background: #000;
  padding: 0px;
  margin: 0px 0;
  min-height: 400px;
  font-family: 'Courier New', monospace;
  height: auto;
}

#pixel-art-board {
  max-width: 100%;
  margin: 0 auto 16px auto;
  display: grid;
  gap: 0;
  justify-content: center;
  align-items: center;
}

.content-box.retro-border {
  margin-bottom: 24px;
}

.bulletin-header {
  text-align: center;
  background: #00ff00;
  color: #000;
  padding: 8px;
  margin-bottom: 15px;
  font-weight: bold;
  border: 2px solid #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.bulletin-header h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 2px;
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.micro-ad {
  background: #000;
  border: 2px solid #3e48fea8;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  color: #00ffff;
  text-transform: lowercase;
  letter-spacing: 1px;
}

.ad-border {
  border: 1px dashed #ffff00;
  padding: 6px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.micro-ad .url {
  color: #ff00ff;
  font-size: 10px;
  text-decoration: underline;
}

.micro-ad .small {
  color: #ffff00;
  font-size: 9px;
}

/* Blinking animation for some ads */
.blink {
  animation: blink 2s infinite;
}

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

/* Hover effects */
.micro-ad:hover {
  background: #333;
  cursor: pointer;
  transform: scale(1.05);
  transition: all 0.2s;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .ads-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
  }
  
  .micro-ad {
    font-size: 10px;
    padding: 6px;
  }
}

/* Ad image styling */
.ad-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 5px;
  border: 1px solid #ffff00;
  border-radius: 2px;
}

.photopile-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.photopile-left button {
  margin-bottom: 24px;
}

.photopile-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: fixed;
  right: 0;
  top: 20vh;
  max-width: 240px;
  padding-right: 240px;
  box-sizing: border-box;
  z-index: 100;
}
.photopile-right button {
  margin-bottom: 24px;
}

.grid-3 > .content-box.retro-border {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  margin-bottom: 0;
  height: auto;
}
.grid-3 > .content-box.retro-border img.pixel-art {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  margin: 0;
  border-bottom: 2px solid var(--neon-green);
}
.grid-3 > .content-box.retro-border h3,
.grid-3 > .content-box.retro-border p {
  width: 100%;
  text-align: center;
  margin: 0.5em 0 0 0;
} 