/* 
 * MaxWin Terminal Page - Neofetch Style
 * Linux terminal aesthetic with Oh-My-Zsh inspired elements
 */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&display=swap');

:root {
    --bg-dark: #0a0a0a;
    --terminal-bg: #1a1a1a;
    --terminal-border: #3a3a3a;
    --text-primary: #d4d4d4;
    --text-dim: #808080;
    --prompt-user: #5fd75f;
    --prompt-host: #5fafff;
    --prompt-path: #af87ff;
    --accent-cyan: #5fdfdf;
    --accent-orange: #ffaf5f;
    --accent-green: #87d787;
    --accent-blue: #5f87ff;
    --traffic-red: #ff5f56;
    --traffic-yellow: #ffbd2e;
    --traffic-green: #27c93f;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Copyright Footer */
.copyright-footer {
    text-align: center;
    padding: 16px 0 8px 0;
    color: #333;
    font-size: 11px;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    margin-top: auto;
}

.footer-link {
    color: inherit;
    text-decoration: none;
}

/* Terminal Window Container */
.terminal-window {
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* Terminal Title Bar - GNOME Wayland Style */
.terminal-titlebar {
    background: #303030;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--terminal-border);
    border-radius: 8px 8px 0 0;
}

.titlebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-icon {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
    opacity: 0.9;
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Inter', 'Cantarell', sans-serif;
}

.titlebar-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.titlebar-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 14px;
}

.titlebar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.titlebar-btn.close:hover {
    background: #c01c28;
}

/* Dropdown Menu */
.menu-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    min-width: 180px;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-dim);
}

.dropdown-item:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dropdown-divider {
    height: 1px;
    background: #4a4a4a;
    margin: 6px 0;
}

/* Search Popup */
.search-container {
    position: relative;
}

.search-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-logo {
    width: 20px;
    height: 20px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.search-input {
    width: 200px;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease;
}

.search-input:focus {
    border-color: var(--prompt-host);
}

.search-input::placeholder {
    color: var(--text-dim);
}

/* Terminal Content Area */
.terminal-content {
    padding: 20px;
    line-height: 1.6;
    font-size: 13px;
}

/* CLI Prompt Styling */
.cli-prompt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 4px;
}

.prompt-user {
    color: var(--prompt-user);
}

.prompt-at {
    color: var(--text-dim);
}

.prompt-host {
    color: var(--prompt-host);
}

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

.prompt-path {
    color: var(--prompt-path);
}

.prompt-symbol {
    color: var(--text-primary);
    margin-right: 8px;
}

.prompt-command {
    color: var(--accent-green);
}

/* Neofetch Layout */
.neofetch-output {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    margin: 16px 0;
    padding: 8px 0;
}

.neofetch-logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.neofetch-logo img {
    width: 300px;
    height: 300px;
    border-radius: 8px;
    border: 2px solid var(--terminal-border);
    object-fit: cover;
}

.neofetch-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}

.neofetch-header {
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 2px;
}

.neofetch-separator {
    color: var(--text-dim);
    margin-bottom: 8px;
}

.neofetch-line {
    display: flex;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.neofetch-label {
    color: var(--accent-cyan);
    min-width: 80px;
    flex-shrink: 0;
}

.neofetch-value {
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.neofetch-bio {
    color: var(--text-dim);
    margin-top: 8px;
    max-width: 400px;
}

/* CLI App Section (Oh-My-Zsh Style) */
.cli-app {
    margin: 24px 0 16px 0;
}

.cli-splash {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
}

.splash-logo {
    font-size: 14px;
}

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

.splash-check {
    color: var(--accent-green);
    font-weight: bold;
}

.cli-app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.cli-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.cli-btn-number {
    color: var(--accent-cyan);
    font-weight: 600;
}

.cli-btn:hover {
    background: rgba(95, 175, 255, 0.1);
    border-color: var(--prompt-host);
    transform: translateY(-1px);
}

.cli-btn:hover .cli-btn-text {
    color: var(--prompt-host);
}

.cli-btn-icon {
    font-size: 14px;
}

.cli-btn-icon.linkedin {
    color: var(--accent-blue);
}

.cli-btn-icon.stackoverflow {
    color: var(--accent-orange);
}

.cli-btn-icon.contact {
    color: var(--accent-green);
}

.cli-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cli-btn:disabled:hover {
    transform: none;
    background: transparent;
    border-color: var(--terminal-border);
}

/* Active Cursor Line */
.cursor-line {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--text-primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Modal Styles - GNOME Window */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-window {
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.modal-titlebar {
    background: #303030;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--terminal-border);
}

.modal-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Inter', 'Cantarell', sans-serif;
}

.modal-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 11px;
    color: var(--accent-cyan);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-input,
.form-textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--prompt-host);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit {
    width: 100%;
    padding: 12px;
    background: var(--prompt-host);
    border: none;
    border-radius: 4px;
    color: var(--bg-dark);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-submit:hover:not(:disabled) {
    background: var(--accent-cyan);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status {
    text-align: center;
    font-size: 11px;
    margin-top: 12px;
    text-transform: uppercase;
}

.form-status.success {
    color: var(--accent-green);
}

.form-status.error {
    color: var(--traffic-red);
}

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

    .terminal-content {
        padding: 16px;
    }

    .neofetch-output {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .neofetch-logo {
        margin-bottom: 8px;
        justify-content: center;
    }

    .neofetch-logo img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .neofetch-stats {
        align-items: flex-start;
    }

    .neofetch-line {
        justify-content: flex-start;
    }

    .neofetch-bio {
        text-align: left;
    }

    .cli-app-container {
        flex-direction: column;
    }

    .cli-btn {
        width: 100%;
        justify-content: left;
    }
}

/* Alpine.js cloak - prevent flash of unstyled content */
[x-cloak] {
    display: none !important;
}