:root {
    --bg-color: #300a24;
    --text-color: #ffffff;
    --accent-color: #00ff88;
    --card-bg: rgba(30, 5, 22, 0.9);
    --button-bg: #4a1a3a;
    --border-color: #5c204a;
    --login-bg: url(ubuntu_theme.png);
    --command-text: #ffaa00;
    --dir-color: #4a9eff;
    --file-color: #ffffff;
    --exec-color: #00ff88;
}

* {
    margin: 0;
    padding: 0;
}

body {
    overflow: hidden;
    text-align: center;
    background-color: var(--bg-color);
    display: grid;
    place-items: center;
    font-family: monospace;
    height: 100vh;
}

h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    background: linear-gradient(65deg, #00b3ff, #00ff4c, #b700ff, #00b3ff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

button {
    font-family: monospace;
    font-size: 1.3rem;
    padding: 16px 48px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: var(--button-bg);
    color: var(--text-color);
    transform: translateY(0);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
    transform: translateY(-3px);
}

button:active {
    transform: translateY(2px);
}

.btn-settings,
.btn-start {
    background: transparent;
    border: 1px solid var(--border-color);
    box-shadow: none;
    font-size: 1rem;
    padding: 12px 32px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.btn-settings:hover,
.btn-start:hover {
    background: var(--bg-color);
}

.terminal-window {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 30px;
    max-width: 95vw;
    width: auto;
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
}

hr {
    height: 10px;
    border: none;
}

.card-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.ubuntu-bg {
    background: linear-gradient(135deg, #300a24, #4a1a3a);
}

.hacker-bg {
    background: linear-gradient(135deg, #0a0a0a, #00ff00);
}

.kali-bg {
    background: linear-gradient(135deg, #0a0a2e, #1a1a4e);
}

.theme-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 220px;
    padding: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.theme-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.theme-card.selected::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #00ff88, #00b3ff, #b700ff, #00ff88);
    background-size: 300% 300%;
    border-radius: 18px;
    z-index: -1;
    animation: borderGlow 3s ease infinite;
    animation-delay: 0.3s;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.theme-preview {
    height: 140px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-name {
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.theme-card.selected {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
}

.theme-card.selected .btn-select {
    background: var(--bg-color);
    color: var(--text-color);
    cursor: default;
    box-shadow: none;
    transform: none;
    pointer-events: none;
}

.theme-card.selected .btn-select:hover {
    transform: none;
    box-shadow: none;
}

#terminal {
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: monospace;
    overflow: hidden;
    cursor: text;
    text-align: left;
    padding: 0;
    box-sizing: border-box;
}

#output-area {
    height: 100%;
    padding: 4px 8px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

#output-area::-webkit-scrollbar {
    display: none;
}

#output-area div {
    word-break: break-all;
    line-height: 1.5;
    font-size: 1rem;
    min-height: 1.5rem;
}

#input-line {
    line-height: 1.5;
    font-size: 1rem;
    min-height: 1.5rem;
}

.prompt {
    display: inline;
    color: var(--accent-color);
}

.command-text {
    color: var(--command-text);
}

.input-text {
    display: inline;
    color: var(--text-color);
}

.input-text.valid-command {
    color: #00ff88;
}

.cursor {
    display: inline;
    color: var(--text-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

#hidden-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 1px;
    height: 1px;
}

body.terminal-page {
    display: block;
    overflow: hidden;
    height: 100vh;
    padding: 0;
    margin: 0;
}

.command-line {
    color: var(--text-color);
}

.dir-color {
    color: var(--dir-color);
}

.file-color {
    color: var(--file-color);
}

.exec-color {
    color: var(--exec-color);
}

@media (max-width: 600px) {
    body {
        padding: 0 20px 0 20px;
        margin: 0 20px 0 20px;
    }

    .card-container {
        flex-direction: column;
        align-items: center;
    }

    .theme-card {
        margin-top: 20px;
        margin-bottom: 20px;
        width: 85vw;
        max-width: 320px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .theme-preview {
        height: 120px;
    }

    .terminal-window {
        padding: 20px 16px;
        margin: 20px;
    }

    button {
        font-size: 1rem;
        padding: 12px 32px;
    }

    .btn-settings,
    .btn-start {
        font-size: 0.9rem;
        padding: 10px 24px;
    }
}