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

html {
    height: 100%;
    overflow: hidden;
}

body {
    background: linear-gradient(135deg, #0a0a1a 0%, #0c1a2d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    height: 100%;
    padding: 20px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

/* Terminal Container - CachyOS Blue Theme */
.terminal {
    background-color: #0a1525;
    width: 1000px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid #1a2a3e;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center bottom;
    margin: 0 auto;
    overflow: hidden;
}

.terminal.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    z-index: 9999;
}

/* Terminal Header - CachyOS Style */
.terminal-header {
    background: linear-gradient(to bottom, #0c1a2d, #0a1525);
    padding: 12px 20px;
    border-bottom: 1px solid #1a2a3e;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
}

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

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-button:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
}

.close { 
    background-color: #ff5f56; 
    box-shadow: 0 0 2px rgba(255, 95, 86, 0.5);
}

.minimize { 
    background-color: #ffbd2e;
    box-shadow: 0 0 2px rgba(255, 189, 46, 0.5);
}

.maximize { 
    background-color: #27c93f;
    box-shadow: 0 0 2px rgba(39, 201, 63, 0.5);
    cursor: pointer;
}

.terminal-title {
    color: #e0e0f0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-title::before {
    content: "⎯";
    color: #4d9fff;
    font-weight: 700;
    margin-right: 4px;
}

/* Terminal Content Area */
.terminal-content {
    padding: 20px 25px;
    color: #e0e0f0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #0a101a;
    font-size: 15px;
    font-weight: 300;
    scrollbar-width: thin;
    scrollbar-color: #1a2a3e #0a101a;
}

/* Custom Scrollbar - CachyOS Style */
.terminal-content::-webkit-scrollbar {
    width: 10px;
}

.terminal-content::-webkit-scrollbar-track {
    background: #0a101a;
    border-radius: 5px;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: #1a2a3e;
    border-radius: 5px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: #2a3a4e;
}

/* Output Area */
#output {
    white-space: pre-wrap;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 10px;
}

/* Command Output Styling */
.command-output {
    margin: 6px 0;
    color: #e0e0f0;
    line-height: 1.6;
    animation: fadeIn 0.3s ease-out;
}

.error-output {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 6px 0;
    line-height: 1.6;
    display: inline-block;
    width: 100%;
}

.success-output {
    color: #6bff95;
    background-color: rgba(107, 255, 149, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 6px 0;
    line-height: 1.6;
    display: inline-block;
    width: 100%;
}

/* Prompt Style */
.prompt {
    color: #4d9fff;
    font-weight: 500;
    margin-right: 12px;
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.3px;
    text-shadow: 0 0 5px rgba(77, 159, 255, 0.3);
}

/* Input Container & Line */
#input-container {
    position: relative;
    background-color: transparent;
    padding: 0;
    width: 100%;
    margin-top: 4px;
}

.input-line {
    display: flex;
    width: 100%;
    position: relative;
    align-items: center;
    min-height: 30px;
}

#command-input {
    background: transparent;
    border: none;
    color: #e0e0f0;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 15px;
    font-weight: 300;
    flex: 1;
    outline: none;
    width: 100%;
    caret-color: transparent;
    line-height: 1.5;
    padding: 6px 8px;
    letter-spacing: 0.3px;
}

/* Custom Blinking Cursor (совместимость с terminal.js) */
.input-line::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 18px;
    background-color: #4d9fff;
    left: calc(var(--prompt-width, 60px) + var(--cursor-pos, 0) * 9.2px + 9px);
    top: 50%;
    transform: translateY(-50%);
    animation: blink 1s step-end infinite;
    pointer-events: none;
    z-index: 2;
    border-radius: 1px;
    box-shadow: 0 0 4px #4d9fff;
}

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

/* Credentials Section - CachyOS Styled */
.credentials {
    text-align: center;
    width: 100%;
    margin-top: 20px;
    border-radius: 8px;
    padding: 12px 20px;
    background: rgba(12, 26, 45, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid #1a2a3e;
    font-size: 13px;
}

.credentials p {
    margin-bottom: 8px;
    color: #8a9fb3;
    letter-spacing: 0.3px;
}

.credentials a {
    color: #6bd4ff;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.credentials a:hover {
    color: #4d9fff;
    text-shadow: 0 0 8px rgba(77, 159, 255, 0.5);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 12px;
}

.social-links a {
    padding: 6px 14px;
    border: 1px solid #2a3a4e;
    border-radius: 6px;
    font-size: 12px;
    background: rgba(77, 159, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(77, 159, 255, 0.2);
    border-color: #4d9fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(77, 159, 255, 0.2);
    color: #4d9fff;
}

/* Reopen Terminal Button */
.reopen-terminal {
    background: linear-gradient(90deg, #2a6bc6, #4d9fff);
    color: #0a1525;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(77, 159, 255, 0.3);
    letter-spacing: 0.5px;
}

.reopen-terminal:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(77, 159, 255, 0.4);
    filter: brightness(1.05);
}

/* Intro.js Override - CachyOS Theme */
.introjs-tooltip {
    background: linear-gradient(145deg, #0c1a2d, #0a1525);
    color: #e0e0f0;
    border: 1px solid #1a2a3e;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    min-width: 380px;
    max-width: 500px;
    border-radius: 12px;
    padding: 0;
    font-family: 'JetBrains Mono', monospace;
}

.introjs-tooltiptext {
    color: #e0e0f0;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    font-weight: 300;
}

.introjs-tooltip-title {
    color: #4d9fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 18px 20px 0;
    letter-spacing: 0.3px;
}

.introjs-tooltipbuttons {
    border-top: 1px solid #1a2a3e;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.introjs-button {
    background: linear-gradient(90deg, #2a6bc6, #4d9fff);
    color: #0a1525;
    border: none;
    text-shadow: none;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.introjs-button:hover {
    background: linear-gradient(90deg, #1e5bb0, #3d8aff);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(77, 159, 255, 0.4);
}

.introjs-skipbutton {
    color: #ff6b6b;
    background: none;
    border: none;
    font-size: 24px;
    padding: 4px 8px;
    transition: all 0.2s;
}

.introjs-skipbutton:hover {
    background: none;
    color: #ff4444;
    transform: scale(1.1);
}

.introjs-progress {
    background-color: #1a2a3e;
    height: 4px;
    margin: 0 15px 10px;
}

.introjs-progressbar {
    background-color: #4d9fff;
}

.introjs-helperLayer {
    background-color: rgba(77, 159, 255, 0.08);
    border: 1px solid rgba(77, 159, 255, 0.3);
    box-shadow: 0 0 20px rgba(77, 159, 255, 0.2);
    border-radius: 10px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 4px rgba(77, 159, 255, 0.4); }
    50% { text-shadow: 0 0 12px rgba(77, 159, 255, 0.7); }
}

.glow-text {
    animation: glow 2s infinite;
}

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

    .container {
        padding: 10px;
    }

    .terminal {
        height: calc(100vh - 130px);
        width: 100%;
        margin: 0;
    }

    .terminal.fullscreen {
        height: 100vh;
    }

    .terminal-header {
        padding: 8px 15px;
    }

    .terminal-content {
        padding: 15px;
        font-size: 14px;
    }

    .terminal-title {
        font-size: 12px;
    }

    .terminal-button {
        width: 10px;
        height: 10px;
    }

    #command-input {
        font-size: 14px;
        padding: 4px 6px;
    }

    .prompt {
        font-size: 14px;
        margin-right: 8px;
    }

    .command-output, .error-output, .success-output {
        font-size: 14px;
    }

    .credentials {
        margin-top: 12px;
        font-size: 11px;
        padding: 8px 15px;
    }

    .input-line::after {
        width: 8px;
        height: 16px;
        left: calc(var(--prompt-width, 55px) + var(--cursor-pos, 0) * 8.5px + 8px);
    }

    .introjs-tooltip {
        min-width: auto !important;
        max-width: calc(100vw - 40px) !important;
        width: calc(100vw - 40px);
    }

    .introjs-tooltiptext {
        font-size: 13px;
        padding: 15px;
    }

    .introjs-tooltip-title {
        font-size: 16px;
        padding: 15px 15px 0;
    }

    .reopen-terminal {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    .terminal-content {
        padding: 12px;
    }

    .terminal-title {
        font-size: 11px;
    }

    #command-input, .prompt {
        font-size: 13px;
    }

    .command-output, .error-output, .success-output {
        font-size: 13px;
    }

    .credentials p {
        font-size: 10px;
    }

    .social-links a {
        padding: 4px 8px;
        font-size: 10px;
    }

    .input-line::after {
        width: 7px;
        height: 14px;
        left: calc(var(--prompt-width, 50px) + var(--cursor-pos, 0) * 8px + 7px);
    }
}

/* Landscape Mobile Orientation */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .terminal {
        height: calc(100vh - 80px);
    }

    .credentials {
        margin-top: 8px;
    }
}

/* Additional CachyOS Details */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    margin: 0 auto;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Soft focus effect for input */
#command-input:focus {
    outline: none;
}

/* Glow effect for buttons hover */
.terminal-button:hover {
    filter: brightness(1.2);
    transform: scale(1.12);
}