:root {
    --bg-color: #0f1014;
    --card-bg: #181a20;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #6366f1; /* Horizon Blue/Purple */
    --accent-hover: #4f46e5;
    --error: #ef4444;
    --success: #4ade80;
    --border: #2d3139;
    --terminal-bg: #000;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Grid Animation */
.bg-grid {
    position: fixed;
    width: 200%;
    height: 200%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: grid-move 20s linear infinite;
    z-index: -1;
    pointer-events: none;
    top: -50%;
    left: -50%;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px); }
}

.container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    max-width: 800px;
    width: 90%;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, #a855f7 25%, #ffffff 50%, #a855f7 75%, var(--accent) 100%);
    background-size: 200% auto;
    animation: horizon-flow 3s linear infinite;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

@keyframes horizon-flow {
    0% { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}

h1, h2 { color: var(--text-main); margin-top: 0; }
p { color: var(--text-muted); line-height: 1.6; }

/* Forms */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-main); }
input[type="text"], input[type="password"], textarea, select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-main);
    box-sizing: border-box;
    font-size: 1rem;
}

select option {
    background-color: var(--card-bg);
    color: var(--text-main);
}
input:focus { outline: none; border-color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Buttons */
button {
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}
button:hover { background: var(--accent-hover); transform: translateY(-1px); }
button.secondary { background: transparent; border: 1px solid var(--border); }
button.secondary:hover { background: rgba(255,255,255,0.05); }
button.danger { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--error); color: var(--error); }
button.danger:hover { background: var(--error); color: white; }

/* Terminal */
.terminal {
    background: var(--terminal-bg);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--success);
    height: 200px;
    overflow-y: auto;
    margin-top: 20px;
}
/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}
.badge-terminal {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.4);
    margin-bottom: 2px;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.meta-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-tag b {
    color: var(--text-main);
    font-weight: 600;
}

.meta-tag-author { border-left: 3px solid var(--accent); }
.meta-tag-version { border-left: 3px solid #a855f7; }
.meta-tag-os { border-left: 3px solid var(--success); }

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 2px solid var(--accent);
}
.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}
.modal-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.modal-title {
    font-size: 1.4rem;
    color: var(--text-main);
    margin: 0;
}
.modal-icon {
    font-size: 2rem;
}
.modal-body {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.modal-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}
.modal-btn:hover {
    background: var(--accent-hover);
}
.modal-error {
    border-top-color: var(--error);
}
