/* ============================================================
   WEBMASTER9000'S TOTALLY RADICAL STYLESHEET
   Optimized for: Netscape Navigator 4.0 at 800x600
   Last updated: May 1999
   ============================================================ */

/* ============================================================
   CSS ANIMATIONS (no JavaScript required!!!)
   ============================================================ */

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

@keyframes blink-slow {
    0%, 66% { opacity: 1; }
    67%, 100% { opacity: 0; }
}

@keyframes rainbow {
    0%   { color: #ff0000; }
    15%  { color: #ff7700; }
    30%  { color: #ffff00; }
    45%  { color: #00ff00; }
    60%  { color: #0000ff; }
    75%  { color: #8b00ff; }
    90%  { color: #ff00ff; }
    100% { color: #ff0000; }
}

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

@keyframes star-pulse {
    0%, 100% { opacity: 1; transform: scale(1); color: #ffff00; }
    25%      { opacity: 0.5; transform: scale(0.6); color: #ff00ff; }
    50%      { opacity: 0.3; transform: scale(0.4); color: #00ffff; }
    75%      { opacity: 0.7; transform: scale(0.8); color: #ff0000; }
}

@keyframes counter-glow {
    0%, 100% { text-shadow: 0 0 4px #00ff00, 0 0 8px #00ff00; }
    50%      { text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

@keyframes bg-shift {
    0%   { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000080;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
    background-size: 20px 20px;
    animation: bg-shift 60s linear infinite;
    font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
    color: #ffff00;
    min-height: 100vh;
}

a {
    color: #00ffff;
}

a:visited {
    color: #ff88ff;
}

a:hover {
    color: #ffffff;
}

/* ============================================================
   ANIMATION HELPER CLASSES
   ============================================================ */

.blink-text {
    animation: blink 1s step-start infinite;
    color: #ff0000;
    font-weight: bold;
}

.blink-slow {
    animation: blink-slow 2s step-start infinite;
    color: #ff00ff;
    font-weight: bold;
}

.rainbow-text {
    animation: rainbow 2s linear infinite;
    font-weight: bold;
    font-size: 1.3em;
}

/* ============================================================
   LOADING SCREEN (shown before Blazor WASM loads)
   ============================================================ */

.loading-screen {
    background: #000080;
    color: #00ffff;
    text-align: center;
    padding: 50px 20px;
    font-family: "Courier New", monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-title {
    color: #ffff00;
    font-size: 1.5em;
    font-weight: bold;
}

.loading-ascii {
    color: #00ff00;
    font-size: 1em;
    display: inline-block;
    text-align: center;
}

.loading-blink {
    color: #ff0000;
    animation: blink 1s step-start infinite;
    font-weight: bold;
}

/* ============================================================
   SITE WRAPPER
   ============================================================ */

.site-wrapper {
    max-width: 1024px;
    margin: 0 auto;
}

/* ============================================================
   MARQUEE BANNER (CSS-only scroll animation)
   ============================================================ */

.marquee-wrapper {
    background: #000000;
    border-top: 3px solid #ffff00;
    border-bottom: 3px solid #ffff00;
    overflow: hidden;
    padding: 4px 0;
    white-space: nowrap;
}

.marquee-text {
    display: inline-block;
    animation: marquee-scroll 25s linear infinite;
    color: #00ffff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
}

.visitor-num {
    color: #ff0000;
    font-weight: bold;
}

/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
    background: linear-gradient(135deg, #800080, #000080, #008080, #800080);
    border: 5px ridge #ffff00;
    text-align: center;
    padding: 15px;
    margin: 5px;
}

.site-title {
    font-size: 2.2em;
    color: #ffff00;
    text-shadow: 3px 3px #ff0000, -1px -1px #ff00ff;
    margin: 0;
    letter-spacing: 2px;
}

.site-tagline {
    color: #00ffff;
    font-size: 1.1em;
    margin: 5px 0 0 0;
    letter-spacing: 1px;
}

.header-stars {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 5px 0;
}

.star-anim {
    color: #ffff00;
    font-size: 1.4em;
    animation: star-pulse 1.5s ease-in-out infinite;
    display: inline-block;
}

.star-anim.delay-1 {
    animation-delay: 0.5s;
}

.star-anim.delay-2 {
    animation-delay: 1s;
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */

.nav-bar {
    background: #008080;
    border: 3px solid #ffff00;
    margin: 0 5px;
}

.nav-table {
    width: 100%;
    border-collapse: collapse;
}

.nav-table td {
    text-align: center;
    padding: 6px 4px;
    border-right: 2px dotted #ffff00;
}

.nav-table td:last-child {
    border-right: none;
}

.nav-link {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    letter-spacing: 1px;
    display: block;
    padding: 4px 8px;
}

.nav-link:hover,
.nav-link.active {
    background: #ffff00;
    color: #000080 !important;
}

.nav-fake {
    color: #888888 !important;
    cursor: not-allowed;
}

.nav-fake:hover {
    background: none !important;
    color: #888888 !important;
}

/* ============================================================
   CONTENT WRAPPER (3-column layout)
   ============================================================ */

.content-wrapper {
    display: grid;
    grid-template-columns: 170px 1fr 170px;
    gap: 5px;
    margin: 5px;
    align-items: start;
}

/* ============================================================
   SIDEBARS
   ============================================================ */

.sidebar-left,
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-box {
    background: #000040;
    border: 3px ridge #00ffff;
}

.sidebar-title {
    background: linear-gradient(90deg, #008080, #006060);
    color: #ffff00;
    font-weight: bold;
    font-size: 0.75em;
    text-align: center;
    padding: 4px;
    border-bottom: 2px solid #00ffff;
    letter-spacing: 1px;
}

.sidebar-content {
    padding: 8px;
    font-size: 0.8em;
    text-align: center;
    color: #ffffff;
}

.sidebar-content p {
    margin: 4px 0;
}

.sidebar-hr {
    border: none;
    border-top: 1px dashed #008080;
    margin: 6px 0;
}

/* Under Construction ASCII */
.construction-ascii {
    background: #000000;
    border: 1px solid #ffff00;
    padding: 4px;
    margin: 4px 0;
}

.construction-ascii pre {
    color: #ffff00;
    font-size: 0.6em;
    margin: 0;
    font-family: "Courier New", monospace;
    line-height: 1.1;
}

/* Hit Counter */
.hit-counter-box {
    padding: 8px 4px;
}

.counter-display {
    background: #000000;
    color: #00ff00;
    font-family: "Courier New", Courier, monospace;
    font-size: 1.5em;
    font-weight: bold;
    padding: 4px 8px;
    border: 2px inset #00aa00;
    letter-spacing: 4px;
    display: inline-block;
    animation: counter-glow 2s ease-in-out infinite;
}

.counter-label {
    color: #00ff00;
    font-size: 0.85em;
    font-weight: bold;
    margin: 4px 0 0 0;
}

.counter-sub {
    color: #008800;
    font-size: 0.7em;
}

/* Web Ring */
.ring-text {
    color: #00ffff;
    font-size: 0.85em;
    margin: 2px 0;
    cursor: pointer;
}

.ring-name {
    color: #ff00ff;
    font-weight: bold;
    font-size: 0.9em;
}

/* Awards */
.award-badge {
    border: 2px ridge #ffd700;
    color: #000000;
    font-weight: bold;
    font-size: 0.75em;
    padding: 5px;
    margin: 4px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.award-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
}

.award-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #808080);
}

.award-star {
    color: #ffd700;
    font-size: 1.3em;
    animation: star-pulse 1s ease-in-out infinite;
    display: inline-block;
}

.zero-js-badge {
    background: #ff0000;
    color: #ffff00;
    font-weight: bold;
    padding: 1px 4px;
    border: 1px solid #ffff00;
    font-size: 0.9em;
}

.sidebar-link {
    color: #00ffff;
    text-align: left;
    padding-left: 8px;
    cursor: pointer;
    font-size: 0.85em;
}

.sidebar-link:hover {
    color: #ffffff;
}

.small-text {
    font-size: 0.7em;
    color: #888888;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.main-content {
    background: #000033;
    border: 3px ridge #ffff00;
    padding: 12px;
    min-height: 500px;
}

/* ============================================================
   HOME PAGE
   ============================================================ */

.welcome-box {
    background: linear-gradient(135deg, #800000, #000080);
    border: 4px ridge #ff00ff;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
}

.welcome-title {
    font-size: 1.3em;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px #000000;
}

.welcome-text {
    color: #ffffff;
    font-size: 0.95em;
    margin: 5px 0;
}

.divider-stars {
    color: #ffd700;
    font-size: 1.2em;
    margin-top: 10px;
    animation: rainbow 3s linear infinite;
}

.section-title {
    color: #ff00ff;
    text-shadow: 2px 2px #800080;
    border-bottom: 3px dashed #ff00ff;
    padding-bottom: 5px;
    font-size: 1.2em;
}

/* ============================================================
   POST PREVIEW CARD
   ============================================================ */

.post-preview {
    background: #000066;
    border: 2px solid #00ffff;
    padding: 10px;
    margin-bottom: 8px;
}

.post-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.new-badge {
    background: #ff0000;
    color: #ffff00;
    font-size: 0.75em;
    padding: 1px 5px;
    border: 1px solid #ffff00;
}

.post-preview-title {
    color: #ffff00 !important;
    text-decoration: none;
    font-size: 1.05em;
    font-weight: bold;
}

.post-preview-title:hover {
    color: #00ffff !important;
    text-decoration: underline;
}

.post-preview-subtitle {
    color: #00ffff;
    font-size: 0.85em;
    margin: 3px 0;
    font-style: italic;
}

.post-preview-meta {
    color: #aaaaaa;
    font-size: 0.78em;
    margin: 4px 0;
}

.read-more-link {
    color: #ff00ff !important;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.85em;
}

.read-more-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.post-divider {
    border: none;
    border-top: 1px dashed #008080;
    margin: 8px 0;
}

.view-all-wrapper {
    text-align: center;
    margin-top: 12px;
}

.btn-view-all {
    background: #800080;
    color: #ffff00 !important;
    border: 3px outset #ff00ff;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    display: inline-block;
    cursor: pointer;
}

.btn-view-all:hover {
    border-style: inset;
    background: #ff00ff;
    color: #000000 !important;
}

/* ============================================================
   BLOG LIST PAGE
   ============================================================ */

.page-title {
    color: #ff00ff;
    text-shadow: 2px 2px #800080;
    font-size: 1.3em;
    border-bottom: 3px dashed #ff00ff;
    padding-bottom: 5px;
}

.page-intro {
    color: #00ffff;
    font-style: italic;
    font-size: 0.9em;
}

.post-count-bar {
    background: #000080;
    border: 2px solid #ffff00;
    padding: 5px 10px;
    color: #ffff00;
    font-size: 0.85em;
    margin-bottom: 10px;
}

.thick-hr {
    border: none;
    border-top: 3px double #00ffff;
    margin: 10px 0;
}

.blog-post-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
}

.blog-post-date {
    flex-shrink: 0;
}

.date-box {
    background: #800000;
    border: 2px ridge #ff0000;
    text-align: center;
    padding: 4px 8px;
    min-width: 55px;
}

.date-month {
    color: #ffffff;
    font-size: 0.65em;
    font-weight: bold;
}

.date-day {
    color: #ffff00;
    font-size: 1.4em;
    font-weight: bold;
    line-height: 1;
}

.date-year {
    color: #aaaaaa;
    font-size: 0.6em;
}

.blog-post-info {
    flex: 1;
}

.blog-post-title-link {
    color: #ffff00 !important;
    text-decoration: none;
    font-size: 1.05em;
    font-weight: bold;
    display: block;
    margin-bottom: 3px;
}

.blog-post-title-link:hover {
    color: #00ffff !important;
    text-decoration: underline;
}

.blog-post-subtitle {
    color: #00ffff;
    font-size: 0.82em;
    font-style: italic;
    margin: 2px 0;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.tag {
    background: #003300;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-size: 0.7em;
    padding: 1px 5px;
    font-family: "Courier New", monospace;
}

/* ============================================================
   INDIVIDUAL POST PAGE
   ============================================================ */

.post-header {
    margin-bottom: 10px;
}

.back-link {
    color: #00ffff !important;
    text-decoration: none;
    font-size: 0.82em;
}

.back-link:hover {
    text-decoration: underline;
}

.post-title {
    color: #ffff00;
    text-shadow: 2px 2px #800000;
    font-size: 1.3em;
    margin: 8px 0 4px 0;
}

.post-subtitle {
    color: #00ffff;
    font-style: italic;
    margin: 0 0 8px 0;
    font-size: 0.9em;
}

.post-meta-bar {
    background: #000080;
    border: 1px solid #ffff00;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 0.82em;
    margin-bottom: 8px;
}

.post-body {
    color: #ffffff;
    line-height: 1.7;
    font-size: 0.92em;
}

.post-body h3 {
    color: #ff00ff;
    border-bottom: 2px dashed #ff00ff;
    padding-bottom: 3px;
}

.post-body ul, .post-body ol {
    color: #ffffff;
    padding-left: 20px;
}

.post-body li {
    margin-bottom: 3px;
}

.post-body hr {
    border: none;
    border-top: 2px dashed #008080;
}

.post-body b {
    color: #ffff00;
}

.post-body i {
    color: #00ffff;
}

.post-footer {
    text-align: center;
    padding: 10px;
    background: #000066;
    border: 2px dashed #ffff00;
}

.btn-back-blog,
.btn-home {
    display: inline-block;
    background: #800000;
    color: #ffff00 !important;
    text-decoration: none;
    border: 3px outset #ff0000;
    padding: 5px 12px;
    font-weight: bold;
    margin: 5px;
    font-size: 0.85em;
    cursor: pointer;
}

.btn-back-blog:hover,
.btn-home:hover {
    border-style: inset;
    background: #ff0000;
    color: #ffffff !important;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.about-avatar {
    flex-shrink: 0;
}

.avatar-box {
    background: #000000;
    border: 3px ridge #00ffff;
    padding: 8px;
    text-align: center;
}

.ascii-avatar {
    color: #00ff00;
    font-size: 0.72em;
    margin: 0;
    line-height: 1.15;
    font-family: "Courier New", monospace;
}

.about-text {
    flex: 1;
    color: #ffffff;
    font-size: 0.9em;
}

.about-section {
    margin-bottom: 8px;
}

.about-section p {
    margin: 4px 0;
}

.about-section-title {
    color: #ff00ff;
    border-bottom: 2px dashed #ff00ff;
    font-size: 1em;
    margin: 0 0 6px 0;
    padding-bottom: 3px;
}

.about-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    color: #ffffff;
}

.about-table tr:nth-child(odd) {
    background: #000066;
}

.about-table tr:nth-child(even) {
    background: #000040;
}

.about-table td {
    padding: 3px 8px;
    border: 1px solid #008080;
}

.about-label {
    color: #ffff00;
    font-weight: bold;
    white-space: nowrap;
    width: 40%;
}

.interests-list {
    color: #ffffff;
    font-size: 0.9em;
    list-style: none;
    padding: 0;
    margin: 0;
}

.interests-list li {
    padding: 2px 0;
    color: #00ff00;
}

.about-footer-box {
    background: #000080;
    border: 3px dashed #ffff00;
    text-align: center;
    padding: 10px;
    margin-top: 15px;
    color: #ffffff;
}

/* ============================================================
   NOT FOUND PAGE
   ============================================================ */

.page-not-found {
    text-align: center;
    padding: 20px;
}

.error-ascii pre {
    color: #ff0000;
    font-family: "Courier New", monospace;
    font-size: 1.1em;
    display: inline-block;
    text-align: center;
}

.post-not-found {
    text-align: center;
    padding: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: #000000;
    border: 3px ridge #ffff00;
    margin: 5px;
    text-align: center;
    padding: 8px;
}

.footer-best-viewed {
    font-size: 0.8em;
    margin: 4px 0;
}

.footer-copy {
    font-size: 0.75em;
    color: #aaaaaa;
    margin: 4px 0;
}

.footer-made {
    font-size: 0.7em;
    color: #666666;
    margin: 4px 0;
}

.badge-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 6px 0;
}

.footer-badge {
    background: #000080;
    border: 2px outset #0000ff;
    color: #ffffff;
    font-size: 0.65em;
    font-weight: bold;
    padding: 3px 6px;
    font-family: Arial, sans-serif;
}

.net-badge {
    background: #5c2d91;
    border-color: #7a3db8;
}

.blazor-badge {
    background: #512bd4;
    border-color: #7b52d4;
    animation: blink-slow 3s step-start infinite;
}

.wasm-badge {
    background: #654ff0;
    border-color: #8070f0;
}

/* ============================================================
   BLAZOR ERROR UI
   ============================================================ */

#blazor-error-ui {
    background: #ff0000;
    color: #ffff00;
    border-top: 3px solid #ffff00;
    padding: 8px;
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-weight: bold;
    display: none;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

#blazor-error-ui .reload {
    color: #ffffff;
}

/* ============================================================
   RESPONSIVE — keep the 90s spirit but don't break on mobile
   ============================================================ */

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

    .sidebar-left,
    .sidebar-right {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .sidebar-box {
        flex: 1;
        min-width: 140px;
        max-width: 200px;
    }

    .site-title {
        font-size: 1.5em;
    }

    .nav-table td {
        font-size: 0.75em;
        padding: 4px 2px;
    }

    .about-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .sidebar-left,
    .sidebar-right {
        display: none;
    }

    .content-wrapper {
        margin: 2px;
    }

    .site-title {
        font-size: 1.2em;
    }

    .nav-table td {
        font-size: 0.65em;
    }
}
