@import url('https://fonts.googleapis.com/css2?family=Tahoma:wght@400;700&display=swap');

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    /* Authentic Windows XP Bliss-inspired gradient */
    background: linear-gradient(to bottom, #5a8fd4 0%, #306db3 40%, #2560ad 60%, #1e4f99 100%);
    background-attachment: fixed;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    min-height: 100vh;
    color: #000;
    position: relative;
}

/* Add a subtle texture overlay for that authentic XP feel */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
    z-index: 1;
}

body > * {
    position: relative;
    z-index: 2;
}

/* Windows XP Container Styles */
.blog-header,
.blog-main,
.blog-footer {
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.header-window,
.content-window,
.footer-window {
    background: #ece9d8;
    background-image: linear-gradient(to bottom, #ffffff 0%, #ece9d8 100%);
    border: 1px solid #0831d9;
    border-radius: 8px 8px 0 0;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 1px 1px 0 rgba(255, 255, 255, 0.9),
        inset -1px -1px 0 rgba(0, 0, 0, 0.1);
}

/* Add that classic XP window shine */
.header-window::before,
.content-window::before,
.footer-window::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 0 0 8px 8px;
    z-index: 0;
}

.header-window,
.content-window,
.footer-window {
    position: relative;
    overflow: hidden;
}

.header-content,
.content,
.footer-content {
    position: relative;
    z-index: 1;
}

/* Title Bar Styles - Authentic Windows XP Luna */
.title-bar {
    background: linear-gradient(to bottom,
        #4488ff 0%,
        #3366ff 8%,
        #0055ff 50%,
        #0044dd 92%,
        #0033cc 100%);
    color: white;
    padding: 4px 8px 4px 8px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border: none;
    border-bottom: 1px solid #0831d9;
    position: relative;
    z-index: 10;
    height: 28px;
}

/* Add the authentic XP title bar icon */
.title-bar .title::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #4488ff 100%);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 2px;
    vertical-align: middle;
}

.window-controls {
    display: flex;
    gap: 3px;
}

.control {
    background: linear-gradient(to bottom, #d6e5ff 0%, #85b2ff 48%, #5a8dd9 52%, #3366cc 100%);
    color: #000033;
    border: 1px solid #001177;
    border-radius: 3px;
    padding: 0px 1px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
    min-width: 21px;
    height: 20px;
    text-align: center;
    line-height: 18px;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.control:hover {
    background: linear-gradient(to bottom, #fff0c0 0%, #ffcc66 48%, #ff9933 52%, #ff6600 100%);
    border-color: #cc4400;
    color: #000;
}

.control:active {
    background: linear-gradient(to bottom, #3366cc 0%, #5a8dd9 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.control.close:hover {
    background: linear-gradient(to bottom, #ff8888 0%, #ff4444 48%, #dd0000 52%, #bb0000 100%);
    border-color: #880000;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

/* Header Styles */
.header-content {
    padding: 15px;
}

.blog-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    background: linear-gradient(to bottom,
        #ffffff 0%,
        #ece9d8 45%,
        #d8d5c8 50%,
        #c8c5b8 100%);
    border: 1px solid;
    border-color: #ffffff #888888 #555555 #ffffff;
    border-radius: 3px;
    padding: 6px 14px;
    text-decoration: none;
    color: #000000;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    font-weight: normal;
    display: inline-block;
    transition: all 0.1s;
    box-shadow:
        1px 1px 0 rgba(255, 255, 255, 0.8),
        inset 1px 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-link:hover {
    background: linear-gradient(to bottom,
        #fff5e5 0%,
        #ffe5b5 45%,
        #ffd585 50%,
        #ffc555 100%);
    border-color: #ffaa00 #cc6600 #995500 #ffaa00;
    color: #000000;
    box-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-link:active {
    background: linear-gradient(to bottom,
        #c8c5b8 0%,
        #d8d5c8 50%,
        #ece9d8 100%);
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.3);
    border-color: #555555 #ffffff #ffffff #888888;
}

/* Main Content Styles */
.blog-main .content {
    padding: 20px;
    font-size: 11px;
    line-height: 1.5;
    color: #333;
}

.blog-article {
    margin-bottom: 30px;
}

.article-meta {
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
    border: 1px solid #666;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 11px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.article-meta span {
    background: linear-gradient(to bottom, #6699ff 0%, #3366cc 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.article-content {
    text-align: left;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    background: linear-gradient(to bottom, #6699ff 0%, #3366cc 100%);
    color: white;
    padding: 8px 12px;
    margin: 20px 0 10px 0;
    border: 1px solid #0026ff;
    border-radius: 4px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

.article-content h1 { font-size: 18px; }
.article-content h2 { font-size: 16px; }
.article-content h3 { font-size: 14px; }
.article-content h4 { font-size: 13px; }

.article-content p {
    margin-bottom: 15px;
    text-align: left;
}

.article-content a {
    color: #000080;
    text-decoration: underline;
}

.article-content a:hover {
    background-color: #ffff00;
    color: #000;
}

.article-content ul,
.article-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    border: 2px solid #000080;
    background-color: #e0e0e0;
    padding: 15px;
    margin: 20px 0;
    font-style: italic;
}

.article-content code {
    background-color: #000;
    color: #00ff00;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.article-content pre {
    background-color: #000;
    color: #00ff00;
    padding: 15px;
    border: 2px solid #c0c0c0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    margin: 20px 0;
}

.article-content img {
    border: 2px solid #000000;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Article Footer */
.article-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #808080;
}

.tags,
.share-buttons {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tags-label,
.share-label {
    font-weight: bold;
    font-size: 18px;
}

.tag {
    background-color: #d0d0d0;
    border: 1px solid #808080;
    padding: 4px 8px;
    font-size: 16px;
}

.share-btn {
    background-color: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    padding: 6px 12px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    cursor: pointer;
}

.share-btn:active {
    border-top: 1px solid #000000;
    border-left: 1px solid #000000;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* Related Articles */
.related-articles {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #808080;
}

.related-articles h3 {
    background-color: #000080;
    color: white;
    padding: 8px 12px;
    margin-bottom: 20px;
    font-size: 24px;
}

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

.related-article {
    background-color: #e0e0e0;
    border: 2px solid #808080;
    padding: 15px;
    text-decoration: none;
    color: #000;
    display: block;
    transition: all 0.1s;
}

.related-article:hover {
    background-color: #d0d0d0;
    border-color: #000080;
}

.related-article h4 {
    font-size: 20px;
    margin: 0 0 10px 0;
    background: none;
    color: #000080;
    padding: 0;
    border: none;
}

.related-article p {
    font-size: 16px;
    margin: 0;
    color: #333;
}

/* Footer Styles */
.footer-window .content {
    padding: 15px;
}

.footer-content {
    text-align: center;
    font-size: 16px;
}

.footer-content p {
    margin: 0 0 10px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    background-color: #c0c0c0;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    padding: 6px 10px;
    text-decoration: none;
    color: #000;
    font-family: 'VT323', monospace;
    font-size: 16px;
    transition: all 0.1s;
}

.footer-links a:hover {
    background-color: #d0d0d0;
}

.footer-links a:active {
    border-top: 1px solid #000000;
    border-left: 1px solid #000000;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* Blog Index Styles */
.blog-index {
    display: grid;
    gap: 20px;
}

.blog-post-preview {
    background: linear-gradient(to bottom, #ffffff 0%, #f5f6fa 100%);
    border: 1px solid #666;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.post-preview-header {
    background: linear-gradient(to bottom, #6699ff 0%, #3366cc 100%);
    color: white;
    padding: 10px 15px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.post-preview-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.post-preview-meta {
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
    padding: 8px 15px;
    font-size: 11px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.post-preview-meta span {
    background: linear-gradient(to bottom, #6699ff 0%, #3366cc 100%);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.post-preview-content {
    padding: 15px;
    font-size: 11px;
    line-height: 1.5;
    color: #333;
}

.post-preview-content p {
    margin: 0 0 15px 0;
}

.read-more {
    background: linear-gradient(to bottom, #6699ff 0%, #3366cc 100%);
    border: 1px solid #0026ff;
    border-radius: 4px;
    padding: 8px 15px;
    text-decoration: none;
    color: white;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.2s;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.read-more:hover {
    background: linear-gradient(to bottom, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.read-more:active {
    background: linear-gradient(to bottom, #1d4ed8 0%, #1e40af 100%);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .blog-nav {
        justify-content: center;
    }

    .article-meta {
        justify-content: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Classic Web 1.0 Flashing CTA - GEOCITIES STYLE! */
.screensaver-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff0000;
    animation: flash-bg 0.5s linear infinite, wiggle 1s ease-in-out infinite;
    color: #ffff00;
    border: 4px dotted #ffff00;
    padding: 15px 25px;
    font-family: 'Comic Sans MS', 'VT323', cursive, monospace;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    display: block;
    z-index: 1000;
    box-shadow: 0 0 20px #ff0000, 0 0 40px #ffff00, inset 0 0 10px rgba(255, 255, 0, 0.5);
    text-shadow:
        0 0 5px #000,
        0 0 10px #000,
        0 0 15px #ffff00,
        2px 2px 0 #000,
        -2px -2px 0 #000;
    text-align: center;
    transform-origin: center;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    max-width: 320px;
    line-height: 1.4;
}

/* Create the classic blinking/flashing effect */
@keyframes flash-bg {
    0%, 49% {
        background: #ff0000;
        color: #ffff00;
        border-color: #ffff00;
    }
    50%, 100% {
        background: #ffff00;
        color: #ff0000;
        border-color: #ff0000;
    }
}

/* Add a little wiggle for extra retro energy */
@keyframes wiggle {
    0%, 100% { transform: rotate(-2deg) scale(1); }
    25% { transform: rotate(2deg) scale(1.05); }
    50% { transform: rotate(-1deg) scale(1); }
    75% { transform: rotate(1deg) scale(1.05); }
}

/* Blink the text like old <blink> tag */
@keyframes blink-text {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.screensaver-cta .marquee {
    display: block;
    animation: blink-text 1s linear infinite;
    font-weight: bold;
    position: relative;
}

/* Add sparkle effect with pseudo-elements */
.screensaver-cta::before {
    content: "★";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    animation: sparkle 0.8s ease-in-out infinite alternate;
    color: #ffff00;
}

.screensaver-cta::after {
    content: "★";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    animation: sparkle 0.8s ease-in-out infinite alternate-reverse;
    color: #ffff00;
}

@keyframes sparkle {
    0% {
        transform: translateY(-50%) scale(0.8) rotate(0deg);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-50%) scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

.screensaver-cta:hover {
    animation: flash-bg 0.3s linear infinite, wiggle 0.5s ease-in-out infinite, pulse-shadow 1s ease infinite;
    cursor: pointer;
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 0 0 20px #ff0000, 0 0 40px #ffff00, inset 0 0 10px rgba(255, 255, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px #ff0000, 0 0 80px #ffff00, inset 0 0 20px rgba(255, 255, 0, 0.8);
    }
}

.screensaver-cta:active {
    transform: scale(0.95) rotate(0deg);
    animation: none;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        padding: 0;
    }

    .blog-header,
    .blog-footer,
    .article-footer,
    .share-buttons,
    .screensaver-cta {
        display: none;
    }

    .header-window,
    .content-window,
    .footer-window {
        background: white;
        border: 1px solid black;
        box-shadow: none;
    }

    .title-bar {
        background: white;
        color: black;
        border-bottom: 1px solid black;
    }
}

/* Responsive CTA */
@media (max-width: 768px) {
    .screensaver-cta {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 12px 20px;
        font-size: 18px;
    }

    .screensaver-cta::before,
    .screensaver-cta::after {
        display: none;
    }
}

/* Retro Web 1.0 Elements */

/* Add a classic "Best viewed in..." badge style */
.retro-badge {
    background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
    border: 2px outset #c0c0c0;
    padding: 4px 8px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #000;
    text-align: center;
    margin: 10px auto;
    max-width: 200px;
}

/* Classic horizontal rule with 3D effect */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(to bottom, #808080 0%, #ffffff 50%, #808080 100%);
    margin: 20px 0;
}

/* Add a "new" or "hot" animated GIF style badge */
.new-badge {
    background: linear-gradient(45deg, #ff0000 25%, #ffff00 25%, #ffff00 50%, #ff0000 50%, #ff0000 75%, #ffff00 75%, #ffff00);
    background-size: 8px 8px;
    animation: barberpole 0.5s linear infinite;
    color: #fff;
    font-weight: bold;
    padding: 2px 8px;
    display: inline-block;
    border: 2px solid #000;
    font-size: 10px;
    text-shadow: 1px 1px 0 #000;
    transform: rotate(-5deg);
}

@keyframes barberpole {
    0% { background-position: 0 0; }
    100% { background-position: 8px 8px; }
}

/* Classic under construction GIF vibe */
.under-construction {
    background: repeating-linear-gradient(
        45deg,
        #ffff00,
        #ffff00 10px,
        #000 10px,
        #000 20px
    );
    padding: 10px;
    text-align: center;
    font-weight: bold;
    animation: slide-stripes 1s linear infinite;
}

@keyframes slide-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 28px 28px; }
}