:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Abstract Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #4f46e5;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: #ec4899;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: #8b5cf6;
    animation-duration: 15s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tab-btn.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.card.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.hidden {
    display: none !important;
}

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

/* Results */
.results-container {
    margin-top: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.result-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-left: 4px solid var(--primary-color);
}

.result-card.danger {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.result-card.success {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.result-details p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.result-details strong {
    color: var(--text-primary);
}

/* Terminal Log UI */
.terminal-container {
    margin-top: 1.5rem;
    background: #000;
    border-radius: 0.5rem;
    border: 1px solid #333;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-out;
}

.terminal-header {
    background: #1a1b26;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-buttons {
    display: flex;
    gap: 0.4rem;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.term-btn.close { background: #ff5f56; }
.term-btn.minimize { background: #ffbd2e; }
.term-btn.maximize { background: #27c93f; }

.terminal-title {
    color: #a9b1d6;
    font-family: monospace;
    font-size: 0.85rem;
    margin-left: 1rem;
    flex: 1;
    text-align: center;
    padding-right: 2.5rem;
}

.terminal-body {
    padding: 1rem;
    background: #000;
    height: 250px;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #a9b1d6;
    line-height: 1.5;
}

.terminal-body p {
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.terminal-body .log-info { color: #7aa2f7; }
.terminal-body .log-success { color: #9ece6a; }
.terminal-body .log-warning { color: #e0af68; }
.terminal-body .log-error { color: #f7768e; }
.terminal-body .log-system { color: #bb9af7; font-style: italic; }

.terminal-body::-webkit-scrollbar {
    width: 8px;
}
.terminal-body::-webkit-scrollbar-track {
    background: #000;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}
