:root {
    --terminal-bg: #1a1b26;
    --terminal-text: #a9b1d6;
    --terminal-green: #9ece6a;
    --terminal-blue: #7aa2f7;
    --terminal-purple: #bb9af7;
    --terminal-red: #f7768e;
    --terminal-yellow: #e0af68;
    --terminal-input-bg: #24283b;
    --terminal-border: #414868;
}

.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--terminal-bg);
    display: grid;
    place-items: center;
    z-index: 9999;
}

.loading-screen::before {
    content: '';
    width: 30px;
    height: 30px;
    border: 2px solid var(--terminal-border);
    border-top-color: var(--terminal-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

body {
    font-family: 'IBM Plex Mono', monospace;
    background-color: var(--terminal-bg);
    color: var(--terminal-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.terminal-container {
    flex: 1;
    margin: 20px;
    background-color: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    background-color: var(--terminal-input-bg);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--terminal-border);
}

.terminal-title {
    color: var(--terminal-text);
    font-size: 20px;
    font-weight: 600;
}

.terminal-content {
    padding: 20px;
}

.version-info {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.badge {
    height: 20px;
}

.subscription-card {
    background-color: var(--terminal-input-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.subscription-card p {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 10px;
}

.subscription-input-container {
    margin-bottom: 15px;
}

.subscription-input {
    width: 100%;
    background-color: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    color: var(--terminal-text);
    padding: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    cursor: text;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terminal-section {
    margin: 20px 0;
}

.terminal-section p {
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 10px;
}

.terminal-section h3 {
    margin-bottom: 10px;
    color: var(--terminal-green);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    color: var(--terminal-text);
    font-size: 10px;
    position: relative;
    margin-bottom: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    position: relative;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin-right: 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    border: 1px solid var(--terminal-border);
    border-radius: 3px;
    background-color: var(--terminal-input-bg);
    vertical-align: middle;
}

.checkbox-wrapper input[type="checkbox"]:checked {
    background-color: var(--terminal-purple);
    border-color: var(--terminal-purple);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terminal-textarea {
    width: 100%;
    min-height: 200px;
    background-color: var(--terminal-input-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    color: #d4d4d4;
    padding: 15px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    resize: vertical;
}

#customTagInput {
    margin-top: 2px;
}

.terminal-textarea:focus {
    outline: none;
    border-color: var(--terminal-purple);
    box-shadow: 0 0 0 2px rgba(187, 154, 247, 0.2);
}

.terminal-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.glow-button {
    background: linear-gradient(75deg, var(--terminal-input-bg), var(--terminal-border));
    color: var(--terminal-text);
    border: 1px solid var(--terminal-border);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

.glow-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.glow-button:hover::before {
    left: 100%;
}

.glow-button.primary {
    background: linear-gradient(45deg, var(--terminal-purple), var(--terminal-blue));
    border-color: var(--terminal-purple);
    color: #ffffff;
}

.glow-button.primary:hover {
    background: linear-gradient(45deg, var(--terminal-blue), var(--terminal-purple));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(122, 162, 247, 0.3);
}

.glow-button.secondary {
    background: linear-gradient(45deg, var(--terminal-input-bg), var(--terminal-border));
}

.glow-button.secondary:hover {
    background: linear-gradient(45deg, var(--terminal-border), var(--terminal-input-bg));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(65, 72, 104, 0.3);
}

.glow-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.terminal-editor {
    height: 400px;
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    margin: 10px 0;
    font-family: 'IBM Plex Mono', monospace;
}

.terminal-error {
    color: var(--terminal-red);
    margin: 10px 0;
    font-family: 'IBM Plex Mono', monospace;
}

.terminal-footer {
    padding: 15px 20px;
    text-align: center;
    background-color: var(--terminal-input-bg);
    border-top: 1px solid var(--terminal-border);
}

.terminal-footer a {
    color: var(--terminal-green);
    text-decoration: none;
}

.terminal-footer a:hover {
    text-decoration: underline;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--terminal-bg);
    display: grid;
    place-items: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--terminal-border);
    border-top-color: var(--terminal-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

.terminal-container,
.terminal-header,
.terminal-content,
.subscription-card,
.terminal-textarea,
.glow-button {
    opacity: 0;
    transform: translateY(10px);
    animation: slideUp 1.3s ease-out forwards;
}

.terminal-container { animation-delay: 0.1s; }
.terminal-header { animation-delay: 0.2s; }
.terminal-content { animation-delay: 0.3s; }
.subscription-card { animation-delay: 0.4s; }
.terminal-textarea { animation-delay: 0.5s; }
.glow-button { animation-delay: 0.6s; }

.glow-button.loading {
    color: transparent;
}

.glow-button.loading::after {
    content: '';
    position: absolute;
    inset: 50% auto auto 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid var(--terminal-text);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--terminal-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--terminal-border);
    border-radius: 4px;
    border: 2px solid var(--terminal-bg);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--terminal-purple);
    border-radius: 6px;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--terminal-border) var(--terminal-bg);
}

@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    ::-webkit-scrollbar-thumb {
        border-width: 1px;
    }
}

@media (max-width: 576px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    ::-webkit-scrollbar-thumb {
        border-width: 1px;
        border-radius: 2px;
    }
    ::-webkit-scrollbar-track {
        border-radius: 2px;
    }
}

@media (max-width: 768px) {
    .terminal-container {
        margin: 10px;
    }
    .terminal-textarea {
        min-height: 150px;
    }
    .terminal-actions {
        flex-direction: column;
    }
    .glow-button {
        width: 100%;
    }
}