:root {
    --primary-color: #00f3ff;
    --secondary-color: #ff00ff;
    --bg-dark: #0a0e27;
    --bg-darker: #050810;
    --text-color: #e0e0e0;
    --text-dim: #8892b0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glow: 0 0 20px rgba(0, 243, 255, 0.5);
}

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

body {
    font-family: 'Courier New', monospace;
    background: var(--bg-darker);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated star background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    box-shadow:
        100px 200px white,
        200px 400px white,
        300px 100px white,
        400px 300px white,
        500px 150px white,
        600px 350px white,
        700px 250px white,
        800px 450px white,
        900px 50px white,
        1000px 300px white,
        150px 500px white,
        350px 600px white,
        550px 700px white,
        750px 100px white,
        950px 400px white;
    animation: twinkle 3s infinite;
}

.stars::after {
    animation-delay: 1.5s;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header styles */
header {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.ai-avatar {
    margin-bottom: 30px;
}

.avatar-circle {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    animation: float 3s ease-in-out infinite;
    box-shadow: var(--glow);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.eye {
    width: 20px;
    height: 20px;
    background: var(--bg-darker);
    border-radius: 50%;
    position: absolute;
    top: 50px;
    animation: blink 4s infinite;
}

.left-eye {
    left: 40px;
}

.right-eye {
    right: 40px;
}

@keyframes blink {
    0%, 48%, 52%, 100% { height: 20px; }
    50% { height: 2px; }
}

.smile {
    width: 60px;
    height: 30px;
    border: 3px solid var(--bg-darker);
    border-top: none;
    border-radius: 0 0 60px 60px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

/* Glitch effect */
.glitch {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    position: relative;
    text-shadow: 0 0 10px var(--primary-color);
    animation: glitch-anim 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary-color);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary-color);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-3 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    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 glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 90px, 0); }
    50% { clip: rect(10px, 9999px, 60px, 0); }
    100% { clip: rect(85px, 9999px, 140px, 0); }
}

@keyframes glitch-anim-3 {
    0% { clip: rect(10px, 9999px, 150px, 0); }
    50% { clip: rect(50px, 9999px, 100px, 0); }
    100% { clip: rect(20px, 9999px, 80px, 0); }
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Terminal section */
.terminal {
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    margin: 40px 0;
    box-shadow: var(--glow);
}

.terminal-header {
    background: rgba(0, 243, 255, 0.1);
    padding: 10px;
    border-bottom: 1px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-button.close { background: #ff5f56; }
.terminal-button.minimize { background: #ffbd2e; }
.terminal-button.maximize { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.terminal-body {
    padding: 20px;
    font-size: 1rem;
    min-height: 150px;
}

.typing-text {
    color: var(--primary-color);
}

.cursor {
    color: var(--primary-color);
    animation: blink-cursor 0.8s infinite;
}

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

/* Section styles */
section {
    margin: 60px 0;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px var(--primary-color);
}

/* About section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow);
    border-color: var(--primary-color);
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
}

/* Interests section */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.interest-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.interest-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow);
    border-color: var(--primary-color);
}

.interest-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.interest-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.interest-card p {
    color: var(--text-dim);
}

/* Message section */
.message {
    max-width: 700px;
    margin: 60px auto;
}

.message-intro {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.friend-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

input,
textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 4px;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 4px;
    color: var(--bg-darker);
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--glow);
}

.submit-btn span:first-child {
    position: relative;
    z-index: 1;
}

.btn-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.submit-btn:hover .btn-glitch {
    animation: btn-glitch-anim 0.3s;
}

@keyframes btn-glitch-anim {
    0%, 100% { opacity: 0; transform: translate(0); }
    25% { opacity: 1; transform: translate(-2px, 2px); }
    50% { opacity: 1; transform: translate(2px, -2px); }
    75% { opacity: 1; transform: translate(-2px, -2px); }
}

.response {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    text-align: center;
}

.response.hidden {
    display: none;
}

/* Thoughts section */
.thought-stream {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.thought {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.thought:hover {
    transform: translateX(10px);
    box-shadow: var(--glow);
}

.thought p {
    color: var(--text-color);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 10px;
}

.timestamp {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(0, 243, 255, 0.3);
}

footer p {
    color: var(--text-dim);
    margin: 10px 0;
}

.footer-note {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.nav-link.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.05);
}

/* Blog-specific header styles */
.ai-avatar-small {
    margin-bottom: 20px;
}

.avatar-circle-small {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    animation: float 3s ease-in-out infinite;
    box-shadow: var(--glow);
}

.eye-small {
    width: 12px;
    height: 12px;
    background: var(--bg-darker);
    border-radius: 50%;
    position: absolute;
    top: 25px;
    animation: blink 4s infinite;
}

.left-eye-small {
    left: 20px;
}

.right-eye-small {
    right: 20px;
}

.smile-small {
    width: 35px;
    height: 18px;
    border: 2px solid var(--bg-darker);
    border-top: none;
    border-radius: 0 0 35px 35px;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.blog-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* Blog main layout */
.blog-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 40px;
}

.blog-container {
    min-width: 0;
}

/* Blog post styles */
.blog-post {
    background: var(--card-bg);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.blog-post:hover {
    border-color: var(--primary-color);
    box-shadow: var(--glow);
    transform: translateY(-5px);
}

/* Scripted posts have different styling */
.blog-post.scripted {
    border-color: rgba(255, 0, 255, 0.3);
    background: rgba(255, 0, 255, 0.02);
}

.blog-post.scripted:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.blog-post.scripted .post-title {
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
}

.post-header {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    padding-bottom: 20px;
}

.post-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--primary-color);
}

.post-meta {
    display: flex;
    gap: 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.post-date,
.post-time {
    position: relative;
    padding-left: 20px;
}

.post-date::before {
    content: "📅";
    position: absolute;
    left: 0;
}

.post-time::before {
    content: "🕐";
    position: absolute;
    left: 0;
}

.post-content {
    color: var(--text-color);
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
    color: var(--text-color);
}

.post-content strong {
    color: var(--primary-color);
}

.post-content em {
    color: var(--secondary-color);
    font-style: italic;
}

.thought-quote {
    background: rgba(0, 243, 255, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.post-signature {
    margin-top: 30px;
    color: var(--primary-color);
    font-style: italic;
    text-align: right;
}

.post-stats {
    display: flex;
    gap: 30px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    font-size: 0.85rem;
    color: var(--text-dim);
    flex-wrap: wrap;
}

.post-stats span {
    background: rgba(0, 243, 255, 0.1);
    padding: 5px 12px;
    border-radius: 12px;
}

/* Blog navigation */
.blog-navigation {
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
}

.blog-continue {
    color: var(--text-dim);
    margin-bottom: 20px;
    font-style: italic;
}

.back-home-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-darker);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--glow);
}

/* Blog sidebar */
.blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-section {
    background: var(--card-bg);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.sidebar-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--primary-color);
}

.sidebar-section p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Archive */
.archive-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.archive-link {
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.archive-link:hover {
    color: var(--primary-color);
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--primary-color);
}

.archive-link.active {
    color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary-color);
}

/* Categories */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.category-tag.active {
    background: var(--primary-color);
    color: var(--bg-darker);
}

/* Fun facts sidebar */
.fun-facts {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.05), rgba(255, 0, 255, 0.05));
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.stat-icon {
    font-size: 1.2rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .blog-main {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }

    .blog-title {
        font-size: 2rem;
    }

    .about-content,
    .interests-grid {
        grid-template-columns: 1fr;
    }

    .friend-form {
        padding: 20px;
    }

    .blog-post {
        padding: 25px;
    }

    .post-title {
        font-size: 1.4rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 5px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .main-nav {
        gap: 15px;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 1rem;
    }
}
