:root {
    --bg-color: #0b0f19;
    --glass-bg: rgba(20, 25, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #00e5ff;
    --primary-hover: #00b3cc;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --success: #10b981;
    --fail: #ef4444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.background-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    z-index: -1;
    animation: pulseBg 10s infinite alternate;
}

@keyframes pulseBg {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 95%;
    max-width: 1200px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    margin: 2rem 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    font-size: 1.5rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.status-indicator.ready .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-indicator.running .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.control-panel {
    text-align: center;
    margin-bottom: 2rem;
}

.description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), #00a3cc);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

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

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

.primary-btn:disabled {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.primary-btn.loading span {
    opacity: 0;
}

.fail-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 20px -10px rgba(239, 68, 68, 0.5);
}

.fail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(239, 68, 68, 0.6);
}

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

.fail-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.results-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.03);
}

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

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.placeholder-text, .info-msg, .error-msg {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem 0;
}

.error-msg {
    color: var(--fail);
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 8px;
    font-style: normal;
}

.info-msg {
    color: var(--primary);
    background: rgba(0, 229, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    font-style: normal;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th, .results-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.results-table th {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge.fail {
    background: rgba(239, 68, 68, 0.2);
    color: var(--fail);
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.secondary-btn {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.secondary-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    transform: translateY(-2px);
}

.secondary-btn:disabled {
    border-color: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.badge.pending {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.logs-panel {
    margin-top: 2rem;
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.logs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.log-window {
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.log-window h3 {
    background: #1e293b;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
}

.terminal-content {
    padding: 1rem;
    height: 450px;
    overflow-y: auto;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #a78bfa;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}
#raw-logs {
    color: #10b981;
}
