/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0f1117;
    color: #e2e8f0;
    margin: 0;
    min-height: 100vh;
}

/* ===== Navbar override ===== */
.navbar {
    background: #1a1d27 !important;
    border-bottom: 1px solid #2d3148 !important;
}
.navbar-brand, .nav-link { color: #a5b4fc !important; }
.navbar-brand { font-weight: 700; letter-spacing: .5px; }
.navbar-toggler-icon { filter: invert(1); }

/* ===== Footer ===== */
.footer {
    background: #1a1d27;
    border-top: 1px solid #2d3148 !important;
    color: #64748b;
    padding: .75rem 0;
    font-size: .85rem;
}
.footer a { color: #a5b4fc; }

/* ===== Main container ===== */
.container { padding-top: 1rem; }

/* ===== Transfer card ===== */
.transfer-container {
    max-width: 520px;
    margin: 3rem auto;
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 40px rgba(0,0,0,.45);
}

/* ===== Step panels ===== */
.step-panel { text-align: center; animation: fadeIn .35s ease; }
.step-panel h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; color: #f1f5f9; }
.subtitle { color: #94a3b8; font-size: .95rem; margin-bottom: 1.5rem; }

.icon-area {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}
.icon-area.spin { animation: spin 2s linear infinite; display: inline-block; }

/* ===== Buttons ===== */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: .75rem;
    padding: .75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    margin-top: .5rem;
}
.btn-primary-custom:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.btn-primary-custom:active { transform: translateY(0); }

/* ===== Share link box ===== */
.link-box {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #0f1117;
    border: 1px solid #3b4168;
    border-radius: .65rem;
    padding: .5rem .75rem;
    margin-bottom: 1rem;
}
.link-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #a5b4fc;
    font-size: .85rem;
    outline: none;
    min-width: 0;
}
.btn-copy {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: .25rem;
    border-radius: .4rem;
    transition: color .2s;
    display: flex;
    align-items: center;
}
.btn-copy:hover { color: #a5b4fc; }

/* ===== Status badges ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem 1rem;
    border-radius: 2rem;
    font-size: .88rem;
    font-weight: 500;
}
.status-badge.waiting  { background: #1e293b; color: #f59e0b; border: 1px solid #f59e0b44; }
.status-badge.connected { background: #052e16; color: #4ade80; border: 1px solid #4ade8044; }
.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.4s ease-in-out infinite;
}

/* ===== Drop zone ===== */
.drop-zone {
    display: block;
    border: 2px dashed #3b4168;
    border-radius: 1rem;
    padding: 2rem 1rem;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    margin-bottom: 1rem;
    text-align: center;
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: #6366f1;
    background: #1e2236;
}
.drop-zone svg { color: #6366f1; margin-bottom: .5rem; }
.drop-zone p { margin: .25rem 0; color: #94a3b8; font-size: .9rem; }
.browse-link { color: #a5b4fc; text-decoration: underline; }
.file-name-display {
    font-size: .9rem;
    color: #a5b4fc;
    font-weight: 600;
    word-break: break-all;
    margin-top: .25rem;
}

/* ===== Status warning badge ===== */
.status-badge.warning { background: #1c1708; color: #fbbf24; border: 1px solid #fbbf2444; }

/* ===== Progress ===== */
.progress-area { margin-top: 1.25rem; }
.progress-bar-track {
    width: 100%;
    height: 10px;
    background: #1e293b;
    border-radius: 5px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 5px;
    transition: width .15s;
}
.progress-footer {
    display: flex;
    justify-content: space-between;
    margin-top: .4rem;
}
.progress-text { font-size: .85rem; color: #94a3b8; }
.speed-label   { font-size: .85rem; color: #6366f1; font-weight: 600; }

/* Copy button: copied state */
.btn-copy.copied { color: #4ade80; }

/* ===== Error ===== */
.error-msg {
    margin-top: 1.25rem;
    background: #2d0a0a;
    border: 1px solid #ef444466;
    color: #fca5a5;
    padding: .75rem 1rem;
    border-radius: .65rem;
    font-size: .9rem;
    text-align: center;
}

/* ===== Utility ===== */
.hidden { display: none !important; }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
