:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --accent: #ff007a;
    --bg-color: #0d0f14;
    --card-bg: rgba(20, 24, 35, 0.8);
    --text-main: #f0f0f0;
    --text-dim: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --info: #3b82f6;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
}

@font-face {
    font-family: 'Inter';
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=JetBrains+Mono&display=swap');
}

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

body {
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(58, 123, 213, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 0, 122, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(0, 210, 255, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

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

header {
    text-align: center;
    margin-bottom: 50px;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px var(--primary));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
    font-weight: 300;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.card:hover { border-color: rgba(0, 210, 255, 0.3); }

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i { color: var(--primary); }

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
}

input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0,0,0,0.3);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4); }

.btn-accent { background: var(--accent); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 0, 122, 0.4); }

.btn-disabled { opacity: 0.5; pointer-events: none; grayscale: 100%; }

.progress-section {
    margin-top: 25px;
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--success));
    width: 0%;
    transition: width 0.4s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.status-log {
    background: #000;
    border-radius: 16px;
    padding: 20px;
    height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-top: 15px;
    border: 1px solid var(--glass);
    scrollbar-width: thin;
}

.status-log div { margin-bottom: 8px; color: var(--text-dim); font-size: 0.85rem; border-left: 2px solid transparent; padding-left: 10px; }
.status-log .log-success { color: var(--success); border-left-color: var(--success); }
.status-log .log-error { color: var(--error); border-left-color: var(--error); }
.status-log .log-info { color: var(--primary); border-left-color: var(--primary); }

/* Custom Toasts */
#toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    background: rgba(30, 34, 45, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 16px 24px;
    border-radius: 16px;
    color: #fff;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    width: 100%;
    animation: toastProgress var(--duration, 4s) linear forwards;
}

.toast-success::after { background: var(--success); }
.toast-error::after { background: var(--error); }
.toast-info::after { background: var(--info); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.95); }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Animations for icons */
.rotate { animation: spin 2s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Badge */
.badge {
    background: var(--success);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 10px;
}
.badge-idle { background: #666; }
.badge-active { background: var(--accent); }
