/**
 * CthulhuCrafts - Terminal/Console Theme Stylesheet
 * Dark Lovecraftian aesthetic with ASCII art styling
 */

/* === CSS Custom Properties === */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #00ff00;
    --text-secondary: #008800;
    --text-dim: #004400;
    --accent-red: #ff0000;
    --accent-red-dim: #880000;
    --border-color: #00ff00;
    --glow-green: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
    --glow-red: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 30px #ff0000;
    --font-mono: 'Fira Code', 'Cascadia Code', 'Source Code Pro', 'Consolas', 'Courier New', monospace;
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

/* === Rain Canvas Overlay === */
#rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

/* === Main Content Container === */
.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === ASCII Box Border Characters === */
/* ╔═══════════════════════════════════════╗
   ║  Used for navigation and containers   ║
   ╚═══════════════════════════════════════╝ */

/* === Navigation === */
.nav-container {
    padding: 1rem;
    text-align: center;
}

.nav-box {
    display: inline-block;
    text-align: left;
    padding: 0;
    margin: 0 auto;
}

.nav-border-top,
.nav-border-bottom {
    color: var(--text-secondary);
    white-space: pre;
    font-size: 0.9rem;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-border-side {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-red);
    text-shadow: var(--glow-red);
    border-color: var(--accent-red-dim);
}

.nav-link.active {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    text-shadow: var(--glow-green);
}

.nav-separator {
    color: var(--text-dim);
}

/* === Page Content === */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.content-box {
    max-width: 800px;
    width: 100%;
    padding: 2rem;
}

/* === ASCII Logo === */
.ascii-logo {
    font-family: var(--font-mono);
    font-size: clamp(0.15rem, 1.2vw, 0.5rem);
    line-height: 1.1;
    color: var(--text-primary);
    white-space: pre;
    text-align: center;
    margin: 0 auto 2rem;
    text-shadow: 0 0 5px var(--text-secondary);
    animation: logoGlow 4s ease-in-out infinite;
}

.ascii-logo-small {
    font-size: clamp(0.1rem, 0.6vw, 0.25rem);
    margin-bottom: 1rem;
}

@keyframes logoGlow {
    0%, 100% {
        text-shadow: 0 0 5px var(--text-secondary);
        opacity: 0.9;
    }
    50% {
        text-shadow: 0 0 10px var(--text-primary), 0 0 20px var(--text-secondary);
        opacity: 1;
    }
}

/* === Headings === */
h1, h2, h3 {
    color: var(--text-primary);
    margin: 0 0 1rem;
    font-weight: normal;
}

h1 {
    font-size: 2rem;
    text-shadow: var(--glow-green);
}

h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

h3 {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* === Tagline === */
.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 1rem 0;
    letter-spacing: 0.1em;
}

/* === Glitch Effect Base === */
.glitch {
    position: relative;
}

/* === Text Sections === */
.text-section {
    text-align: left;
    margin: 2rem 0;
    padding: 1rem;
    border-left: 2px solid var(--text-dim);
}

.text-section p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

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

/* === Lists === */
.service-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    text-align: left;
}

.service-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
}

.service-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

.service-list li:hover {
    color: var(--text-primary);
}

.service-list li:hover::before {
    color: var(--accent-red);
    text-shadow: var(--glow-red);
}

/* === Links Page === */
.links-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.links-list li {
    margin: 1rem 0;
}

.links-list a {
    display: inline-block;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-dim);
    transition: var(--transition-fast);
}

.links-list a:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
    text-shadow: var(--glow-red);
    box-shadow: 0 0 10px var(--accent-red-dim);
}

.links-list a::before {
    content: '[ ';
    color: var(--text-dim);
}

.links-list a::after {
    content: ' ]';
    color: var(--text-dim);
}

/* === Contact Coming Soon === */
.coming-soon {
    font-size: 1.5rem;
    color: var(--accent-red);
    text-shadow: var(--glow-red);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.tentacle-art {
    font-size: 0.6rem;
    line-height: 1.2;
    color: var(--text-dim);
    white-space: pre;
    margin: 2rem 0;
}

/* === ASCII Decorations === */
.ascii-divider {
    color: var(--text-dim);
    margin: 2rem 0;
    white-space: pre;
    font-size: 0.8rem;
}

/* === Footer === */
.footer {
    padding: 1rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--text-dim);
    margin-top: auto;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
    text-shadow: var(--glow-red);
    box-shadow: 0 0 10px var(--accent-red-dim);
}

/* === Responsive Design === */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .ascii-logo {
        font-size: clamp(0.1rem, 2vw, 0.4rem);
    }

    .ascii-logo-small {
        font-size: clamp(0.08rem, 1vw, 0.2rem);
    }

    .nav-links {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-border-top,
    .nav-border-bottom {
        font-size: 0.7rem;
    }

    .content {
        padding: 1rem;
    }

    .content-box {
        padding: 1rem;
    }

    .tentacle-art {
        font-size: 0.4rem;
    }
}

@media (max-width: 480px) {
    .ascii-logo {
        font-size: clamp(0.08rem, 2.5vw, 0.35rem);
    }

    .ascii-logo-small {
        display: none;
    }

    h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.9rem;
    }
}

/* === Scrollbar Styling === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* === Selection Styling === */
::selection {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* === CRT Scanline Effect (optional) === */
.crt-effect::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}
