/* ==========================================
   CSS RESET & VARIABLES
   ========================================== */
:root {
    --bg-color: #050010;
    --text-color: #00ff00; /* Classic Hacker Green */
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --retro-gray: #c0c0c0;
    --retro-dark-gray: #808080;
    --retro-light-gray: #ffffff;
    --border-outset: 3px outset var(--retro-light-gray);
    --border-inset: 3px inset var(--retro-light-gray);
    --font-pixel: 'DotGothic16', 'MS Gothic', sans-serif;
    --font-digital: 'VT323', monospace;
    --font-heading: 'Dela Gothic One', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px),
        radial-gradient(rgba(255,255,255,.4), rgba(255,255,255,.1) 2px, transparent 30px);
    background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 150px;
    color: var(--text-color);
    font-family: var(--font-pixel);
    line-height: 1.5;
    padding: 20px 10px;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff00ff' stroke='%23ffffff' stroke-width='1.5' d='M4.5,1.5 L4.5,22.5 L10.5,16.5 L19.5,16.5 Z'/%3E%3C/svg%3E"), auto;
}

/* Sparkle Canvas background */
#sparkle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ==========================================
   LAYOUT CONTAINERS
   ========================================== */
.site-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: rgba(5, 0, 16, 0.85);
    border: 6px double var(--neon-pink);
    padding: 15px;
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.4);
}

/* ==========================================
   RETRO SPECIAL EFFECTS & MARQUEE
   ========================================== */
.marquee-container {
    width: 100%;
    background-color: #000;
    border: 3px inset #333;
    padding: 8px;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 20px;
    box-shadow: inset 0 0 8px #00ff00;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-anim 25s linear infinite;
    color: var(--neon-blue);
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 0 0 5px var(--neon-blue);
}

@keyframes marquee-anim {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.blink {
    animation: blink-anim 1s steps(2, start) infinite;
}

.blink-fast {
    animation: blink-anim 0.4s steps(2, start) infinite;
}

@keyframes blink-anim {
    to { visibility: hidden; }
}

/* ==========================================
   HEADER & WORDART
   ========================================== */
.retro-header {
    text-align: center;
    padding: 20px 0;
    background: linear-gradient(180deg, #1b023a 0%, #000000 100%);
    border: 3px outset var(--neon-pink);
    margin-bottom: 25px;
    position: relative;
}

/* 3D Rainbow WordArt using modern CSS but retro design */
.wordart.rainbow {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    position: relative;
    padding: 10px;
    transform: skew(-10deg) scaleY(1.1);
}

.wordart.rainbow .text {
    background: linear-gradient(to right, red, orange, yellow, green, #00ffff, blue, purple, red);
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-text-flow 6s linear infinite;
    filter: drop-shadow(4px 4px 0px #000);
}

@keyframes rainbow-text-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.subtitle {
    color: #ff0055;
    font-size: 1.2rem;
    margin-top: 10px;
    text-shadow: 0 0 8px rgba(255, 0, 85, 0.8);
    letter-spacing: 3px;
}

/* ==========================================
   WIDGETS & BOXES
   ========================================== */
.widget-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.pixel-box {
    flex: 1;
    min-width: 280px;
    background-color: #111;
    border: 3px outset var(--retro-dark-gray);
    padding: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pixel-box::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}

/* Construction Box */
.construction-box {
    border-color: #ffcc00;
    background: repeating-linear-gradient(
        -45deg,
        #2b2200,
        #2b2200 10px,
        #111 10px,
        #111 20px
    );
    color: #ffcc00;
    text-shadow: 0 0 5px #ffcc00;
}

.construction-icon {
    font-size: 2rem;
    animation: bounce 0.6s infinite alternate;
}

.construction-text {
    text-align: center;
    padding: 0 10px;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* Counter Box */
.counter-box {
    border-color: var(--neon-blue);
    flex-direction: column;
    gap: 5px;
}

.counter-title {
    font-size: 0.9rem;
    color: var(--neon-blue);
}

.counter-display {
    display: flex;
    background-color: #000;
    border: 3px inset #333;
    padding: 5px 10px;
    box-shadow: inset 0 0 10px #000;
}

.counter-display .digit {
    font-family: var(--font-digital);
    font-size: 2.2rem;
    color: #ff0055;
    background-color: #200008;
    padding: 0 4px;
    margin: 0 2px;
    border-radius: 3px;
    border: 1px solid #400010;
    text-shadow: 0 0 8px #ff0055;
    min-width: 28px;
    text-align: center;
}

.counter-footer {
    font-size: 0.75rem;
    color: #aaa;
    text-align: center;
}

/* ==========================================
   MAIN LAYOUT (SIMULATING FRAMES)
   ========================================== */
.main-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Navigation */
.sidebar-nav {
    background-color: #1a0826;
    border: 3px outset var(--neon-pink);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-title {
    text-align: center;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
    color: #fff;
    font-weight: bold;
    padding: 5px;
    border: 2px outset #ff77ff;
    text-shadow: 1px 1px 2px #000;
    font-size: 0.95rem;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border: 2px outset #555;
    background-color: #301440;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background-color: var(--neon-pink);
    color: #fff;
    border-style: inset;
    text-shadow: 0 0 5px #fff;
    box-shadow: 0 0 8px var(--neon-pink);
    transform: scale(1.03);
}

/* Winamp Player Style */
.winamp-player {
    background-color: #222;
    border: 3px outset #555;
    font-family: var(--font-digital);
    color: #00ff00;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.winamp-title-bar {
    background: linear-gradient(90deg, #082567, #0a4aa5);
    color: #fff;
    padding: 3px 6px;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #111;
}

.winamp-title-text {
    font-family: sans-serif;
    font-size: 10px;
    font-weight: bold;
}

.winamp-close {
    background-color: #ccc;
    color: #000;
    border: 1px outset #fff;
    width: 12px;
    height: 12px;
    font-size: 8px;
    text-align: center;
    line-height: 10px;
    cursor: pointer;
    font-family: sans-serif;
}

.winamp-display {
    background-color: #000;
    border: 2px inset #111;
    padding: 6px;
    margin: 4px 0;
    display: grid;
    grid-template-columns: 1fr 60px;
    grid-template-rows: auto auto;
    gap: 4px;
}

.winamp-track-title {
    grid-column: 1 / 3;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #00ff00;
}

.winamp-time {
    font-size: 1.4rem;
    color: #00ff00;
    align-self: center;
}

.winamp-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    justify-content: flex-end;
}

.winamp-visualizer .bar {
    width: 4px;
    height: 2px;
    background-color: var(--neon-blue);
    transition: height 0.1s;
}

/* Visualizer bounce animation when playing */
.winamp-player.playing .winamp-visualizer .bar:nth-child(1) { animation: bounce-bar 0.3s ease-in-out infinite alternate; }
.winamp-player.playing .winamp-visualizer .bar:nth-child(2) { animation: bounce-bar 0.4s ease-in-out infinite alternate 0.1s; }
.winamp-player.playing .winamp-visualizer .bar:nth-child(3) { animation: bounce-bar 0.25s ease-in-out infinite alternate 0.05s; }
.winamp-player.playing .winamp-visualizer .bar:nth-child(4) { animation: bounce-bar 0.35s ease-in-out infinite alternate 0.15s; }
.winamp-player.playing .winamp-visualizer .bar:nth-child(5) { animation: bounce-bar 0.28s ease-in-out infinite alternate 0.08s; }

@keyframes bounce-bar {
    0% { height: 2px; }
    100% { height: 18px; }
}

.winamp-controls {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

.winamp-btn {
    flex: 1;
    margin: 0 1px;
    background-color: #333;
    border: 2px outset #555;
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 3px 0;
}

.winamp-btn:active {
    border-style: inset;
    background-color: #111;
}

.winamp-volume {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 3px;
}

.winamp-volume input[type="range"] {
    flex: 1;
    height: 6px;
    background: #444;
    outline: none;
    -webkit-appearance: none;
}

.winamp-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 12px;
    background: #aaa;
    border: 1px outset #fff;
    cursor: pointer;
}

/* Dancing Avatar placeholder */
.gif-collection {
    text-align: center;
    border: 2px dashed var(--neon-pink);
    padding: 10px;
    background-color: rgba(255,0,255,0.05);
}

.dancing-avatar {
    font-size: 3.5rem;
    display: inline-block;
    animation: dance-move 0.6s infinite alternate ease-in-out;
}

.gif-caption {
    font-size: 0.75rem;
    color: var(--neon-pink);
    margin-top: 5px;
}

@keyframes dance-move {
    0% { transform: translateY(0) rotate(-10deg) scaleX(1); }
    50% { transform: translateY(-10px) rotate(0deg) scaleX(1.1); }
    100% { transform: translateY(0) rotate(10deg) scaleX(1); }
}

/* ==========================================
   CONTENT AREA & SECTIONS
   ========================================== */
.content-area {
    background-color: #0c0218;
    border: 3px inset var(--retro-dark-gray);
    padding: 20px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
    min-height: 400px;
}

.content-section {
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.4rem;
    color: var(--neon-pink);
    border-bottom: 2px dashed var(--neon-pink);
    padding-bottom: 5px;
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(255,0,255,0.5);
    background-color: rgba(255,0,255,0.1);
    padding: 5px 10px;
}

/* Profile Card Table */
.retro-table {
    width: 100%;
    border-collapse: collapse;
    border: 3px outset var(--retro-dark-gray);
    background-color: #111;
}

.retro-table th,
.retro-table td {
    padding: 10px;
    border: 1px solid #333;
    text-align: left;
    font-size: 0.95rem;
}

.retro-table th {
    background-color: #2b0c3f;
    color: var(--neon-blue);
    width: 30%;
    text-shadow: 0 0 4px var(--neon-blue);
}

.retro-table td {
    color: #fff;
}

/* Diary Entry */
.diary-entry {
    background-color: #111;
    border: 2px outset #444;
    padding: 15px;
    margin-bottom: 15px;
}

.diary-date {
    font-weight: bold;
    color: var(--neon-blue);
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.diary-date a {
    color: inherit;
    text-decoration: none;
}

.diary-date a:hover {
    color: var(--neon-pink);
    text-decoration: underline;
}

.diary-back-link {
    display: inline-block;
    color: var(--neon-blue);
    margin-bottom: 15px;
}

.diary-text {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.diary-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border: 2px solid var(--neon-blue);
    box-sizing: border-box;
}

/* Gallery ASCII Art */
.warning-text {
    color: #ff3333;
    text-shadow: 0 0 5px #ff3333;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
}

.gallery-item {
    background-color: #050505;
    border: 3px outset var(--retro-dark-gray);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ascii-art {
    font-family: monospace;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-color);
    background-color: #000;
    padding: 15px;
    border: 2px inset #222;
    width: 100%;
    overflow-x: auto;
    white-space: pre;
    text-align: left;
}

.item-caption {
    font-size: 0.8rem;
    color: #aaa;
    text-align: center;
}

/* ==========================================
   GUESTBOOK FORM & MESSAGES
   ========================================== */
.retro-form {
    background-color: #180928;
    border: 3px outset var(--neon-pink);
    padding: 15px;
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.form-row label {
    font-size: 0.9rem;
    color: var(--neon-blue);
}

.form-row input,
.form-row select,
.form-row textarea {
    background-color: #000;
    border: 3px inset var(--retro-dark-gray);
    color: #fff;
    padding: 8px;
    font-family: var(--font-pixel);
    font-size: 0.9rem;
    width: 100%;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 5px var(--neon-pink);
}

.btn-container {
    flex-direction: row;
    justify-content: flex-end;
    gap: 10px;
}

.retro-btn {
    background-color: var(--retro-gray);
    border: 3px outset var(--retro-light-gray);
    color: #000;
    padding: 6px 15px;
    font-family: var(--font-pixel);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: bold;
}

.retro-btn:active {
    border-style: inset;
    background-color: var(--retro-dark-gray);
}

.message-board {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gb-entry {
    background-color: #111;
    border: 2px outset #333;
    padding: 12px;
    border-radius: 4px;
    position: relative;
    animation: fade-in 0.4s ease-out;
}

.gb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px dashed #333;
    padding-bottom: 6px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.gb-avatar {
    font-size: 1.2rem;
}

.gb-name {
    color: var(--neon-blue);
    font-weight: bold;
}

.gb-date {
    color: #888;
    margin-left: auto;
    font-size: 0.75rem;
}

.gb-msg {
    font-size: 0.9rem;
    color: #fff;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ==========================================
   LINKS & BADGES SECTION
   ========================================== */
.banners-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}

/* Custom CSS-drawn banners (imitating 200x40px banners) */
.retro-banner {
    width: 200px;
    height: 40px;
    border: 3px outset #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-pixel);
    cursor: pointer;
    transition: transform 0.2s;
    user-select: none;
}

.retro-banner:hover {
    transform: scale(1.05) rotate(1deg);
}

.retro-banner:active {
    border-style: inset;
}

.banner-blue {
    background: linear-gradient(135deg, #020024 0%, #090979 50%, #00d4ff 100%);
    border-color: var(--neon-blue);
    color: #fff;
}

.banner-red {
    background: linear-gradient(0deg, #5c0000 0%, #ff0000 100%);
    border-color: #ff3333;
    color: #ffff00;
    font-weight: bold;
}

.banner-green {
    background: radial-gradient(circle, #0f3f0f 0%, #000 100%);
    border-color: var(--text-color);
    color: var(--text-color);
}

.banner-title {
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px #000;
}

.banner-sub {
    font-size: 0.6rem;
    opacity: 0.8;
}

/* Micro badges (88x31px style) */
.ie-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.micro-badge {
    width: 88px;
    height: 31px;
    background-color: #000;
    border: 2px outset #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: sans-serif;
    font-size: 8px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    user-select: none;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.micro-badge span {
    transform: scale(0.9);
}

.micro-badge.ie-blue {
    background-color: #004e92;
    border-color: #00a8ff;
    color: #ffcc00;
}

.micro-badge.pad-notepad {
    background-color: #fff;
    border-color: #ccc;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
}

.micro-badge.flash-badge {
    background-color: #d11c1c;
    border-color: #ff5555;
    color: #fff;
}

/* ==========================================
   FOOTER
   ========================================== */
.flame-divider {
    border: none;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #ff3300,
        #ff3300 15px,
        #ffcc00 15px,
        #ffcc00 30px
    );
    margin: 25px 0 15px 0;
    box-shadow: 0 0 8px #ff3300;
}

.retro-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

.copyright {
    margin-bottom: 5px;
    color: #aaa;
}

.best-view {
    font-size: 0.75rem;
    color: #666;
}
