/* =========================================
   SMIED.RU - Retro Terminal Style
   ========================================= */

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

:root {
    --terminal-green: #0f0;
    --terminal-green-dim: #0a0;
    --terminal-amber: #ffb000;
    --terminal-cyan: #0ff;
    --terminal-red: #f55;
    --terminal-bg: rgba(10, 15, 20, 0.92);
    --terminal-border: #333;
    --font-terminal: 'VT323', monospace;
    --font-pixel: 'Press Start 2P', monospace;
}

html {
    font-size: 18px;
}

body {
    font-family: var(--font-terminal);
    background: #0a0f14;
    color: var(--terminal-green);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.4;
}

/* =========================================
   Background Image
   ========================================= */
.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/hero-bg.jpg') center center / cover no-repeat;
    filter: brightness(0.4) saturate(0.8);
    z-index: -3;
}

/* =========================================
   CRT Effects
   ========================================= */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
    z-index: 999;
}

/* =========================================
   Terminal Window
   ========================================= */
.terminal {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    box-shadow:
        0 0 20px rgba(0, 255, 0, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 10;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(180deg, #333 0%, #222 100%);
    border-bottom: 1px solid var(--terminal-border);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close { background: #ff5f56; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #27ca40; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.terminal-body {
    padding: 20px;
    min-height: 60vh;
}

/* =========================================
   Boot Sequence
   ========================================= */
.boot-sequence {
    margin-bottom: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.boot-sequence .line {
    margin-bottom: 3px;
}

.boot-sequence .ok {
    color: var(--terminal-green);
}

/* =========================================
   ASCII Logo
   ========================================= */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.ascii-logo {
    font-family: var(--font-terminal);
    font-size: 0.6rem;
    line-height: 1.1;
    color: var(--terminal-green);
    text-shadow: 0 0 10px var(--terminal-green);
    white-space: pre;
    display: inline-block;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px var(--terminal-green), 0 0 10px var(--terminal-green); }
    to { text-shadow: 0 0 10px var(--terminal-green), 0 0 20px var(--terminal-green), 0 0 30px var(--terminal-green-dim); }
}

.tagline {
    margin-top: 15px;
    font-size: 1.1rem;
    color: var(--terminal-amber);
}

/* =========================================
   Menu
   ========================================= */
.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 30px 0;
    padding: 15px;
    border: 1px dashed var(--terminal-border);
}

.menu-item {
    display: block;
    color: var(--terminal-green);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 3px;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(0, 255, 0, 0.1);
    padding-left: 20px;
}

.menu-item .prompt {
    color: var(--terminal-cyan);
    margin-right: 5px;
}

.menu-item .desc {
    color: #666;
    font-size: 0.85rem;
    margin-left: 10px;
}

/* =========================================
   Terminal Input
   ========================================= */
.terminal-input-section {
    margin: 25px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-user {
    color: var(--terminal-cyan);
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--terminal-green);
    font-family: var(--font-terminal);
    font-size: 1.1rem;
    caret-color: var(--terminal-green);
}

.terminal-input::placeholder {
    color: #444;
}

.hint {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #555;
}

/* =========================================
   Terminal Output
   ========================================= */
.terminal-output {
    min-height: 20px;
    padding: 10px 0;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-output .output-line {
    margin-bottom: 5px;
    animation: typeIn 0.3s ease;
}

@keyframes typeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.terminal-output .error {
    color: var(--terminal-red);
}

.terminal-output .success {
    color: var(--terminal-green);
}

.terminal-output .info {
    color: var(--terminal-amber);
}

/* =========================================
   Contacts
   ========================================= */
.contacts-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--terminal-border);
}

.section-title {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-link {
    color: var(--terminal-green);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
}

.social-link:hover {
    border-color: var(--terminal-green);
    background: rgba(0, 255, 0, 0.1);
    text-shadow: 0 0 10px var(--terminal-green);
}

.social-link .bracket {
    color: var(--terminal-cyan);
}

/* =========================================
   Footer
   ========================================= */
.terminal-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--terminal-border);
    text-align: center;
}

.copyright {
    color: #555;
    font-size: 0.85rem;
}

.secret-hint {
    margin-top: 10px;
    font-size: 0.7rem;
    color: #333;
    transition: color 0.3s;
}

.secret-hint:hover {
    color: #555;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* =========================================
   Secret Carp (Konami Code)
   ========================================= */
.secret-carp {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.secret-carp.active {
    opacity: 1;
    animation: floatCarp 3s ease-in-out infinite;
}

.carp-ascii {
    color: var(--terminal-amber);
    text-shadow: 0 0 20px var(--terminal-amber);
    font-size: 1.5rem;
    white-space: pre;
}

@keyframes floatCarp {
    0%, 100% { transform: translate(-50%, -50%) rotate(-5deg); }
    50% { transform: translate(-50%, -60%) rotate(5deg); }
}

/* =========================================
   Matrix Rain
   ========================================= */
.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.matrix-canvas.active {
    opacity: 1;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 850px) {
    .terminal {
        margin: 10px;
        border-radius: 0;
    }

    .ascii-logo {
        font-size: 0.35rem;
    }

    .menu {
        padding: 10px;
    }

    .social-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 500px) {
    html {
        font-size: 16px;
    }

    .terminal-body {
        padding: 15px;
    }

    .ascii-logo {
        font-size: 0.28rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .input-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .terminal-input {
        width: 100%;
    }

    .menu-item .desc {
        display: block;
        margin-left: 20px;
        margin-top: 3px;
    }
}

/* =========================================
   Selection
   ========================================= */
::selection {
    background: var(--terminal-green);
    color: #000;
}

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

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--terminal-green-dim);
}
