/* =========================
   🧩 COMPONENTS SYSTEM
========================= */

/* =========================
   CARD
========================= */
.card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: min(420px, 95%);
    max-height: 80vh; /* 🔥 prevents page stretching */

    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(14px);

    border: 1px solid rgba(0,255,136,0.35);
    border-radius: 14px;

    padding: 28px;

    box-shadow:
        0 0 15px rgba(0,255,136,0.15),
        0 0 60px rgba(0,255,136,0.08),
        inset 0 0 20px rgba(0,255,136,0.05);

    display: flex;
    flex-direction: column;
    gap: 14px;

    overflow: hidden; /* 🔥 locks layout */

    z-index: 10;
}

.card h2 {
    font-size: 1.4rem;
    text-align: left;
    color: #00ffaa;
}


/* =========================
   FORM LAYOUT
========================= */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 10px;
}


/* =========================
   OUTPUT PANEL
========================= */
.output-panel {
    margin-top: 10px;
    padding: 12px;

    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(0,255,136,0.25);
    border-radius: 12px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    flex: 1;        /* 🔥 takes remaining space */
    min-height: 0;  /* 🔥 fixes flex overflow bug */
}


/* =========================
   STATUS LINE
========================= */
.status-line {
    font-size: 0.8rem;
    color: #00ffaa;
}


/* =========================
   PROGRESS
========================= */
.progress-item span {
    font-size: 0.75rem;
    opacity: 0.7;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,255,136,0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar div {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff88, #00ffaa);
    box-shadow: 0 0 10px #00ff88;
    transition: width 0.3s ease;
}


/* =========================
   STATUS STATES (OPTIONAL 🔥)
========================= */
.status-success {
    color: #00ff88;
}

.status-failed {
    color: #ff4d4d;
}

.status-working {
    color: #00ffaa;
}

@media (max-width: 600px) {
    .card {
        position: absolute;
        top: 10%;       
        left: 50%;
        transform: translateX(-50%);
        max-height: none;
        height: auto;
        padding: 20px;
    }

    .output-panel {
        max-height: none;
    }
}
