* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f4f6f9;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 30px 15px;
}

#app {
    background: white;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 580px;
    width: 100%;
}

/* ── Step Bar ── */
.step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.3s;
}

.step-dot.active {
    background: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.2);
}

.step-dot.done {
    background: #4caf50;
}

.step-line {
    width: 40px;
    height: 3px;
    background: #e0e0e0;
}

/* ── Screens ── */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

.screen-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

h1 {
    text-align: center;
    color: #1a1a1a;
    font-size: 22px;
    margin-bottom: 12px;
}

h2 {
    color: #1a1a1a;
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e8e8;
}

p {
    color: #555;
    margin-bottom: 14px;
    font-size: 15px;
}

/* ── Buttons ── */
button {
    font-size: 16px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: all 0.2s;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.primary-btn {
    background: #0066cc;
    color: white;
}

.primary-btn:hover:not(:disabled) {
    background: #0052a3;
    transform: translateY(-1px);
}

.secondary-btn {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    margin-top: 8px;
}

.secondary-btn:hover:not(:disabled) {
    background: #f5f5f5;
}

/* ── Info / Tip / Warning Cards ── */
.info-card {
    background: #f0f7ff;
    padding: 18px 20px;
    border-radius: 12px;
    margin: 18px 0;
}

.info-card.success-card {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.info-title {
    font-weight: 600;
    color: #333 !important;
    margin-bottom: 10px !important;
}

.check-item {
    padding: 6px 0;
    font-size: 15px;
    color: #444;
    line-height: 1.5;
}

.tip-box {
    background: #f0faf0;
    border-left: 4px solid #4caf50;
    padding: 14px 16px;
    border-radius: 0 10px 10px 0;
    margin: 18px 0;
    font-size: 14px;
    color: #2e7d32;
}

.warning-box {
    background: #fff8e1;
    border-left: 4px solid #ff9800;
    padding: 14px 16px;
    border-radius: 0 10px 10px 0;
    margin: 18px 0;
    font-size: 14px;
    color: #e65100;
    line-height: 1.6;
}

/* ── Step Cards (numbered instructions) ── */
.step-card {
    display: flex;
    gap: 14px;
    margin: 14px 0;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-top: 2px;
}

.step-text {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.step-text strong {
    color: #222;
}

.step-text em {
    color: #666;
}

.simple-list {
    margin: 6px 0 0 18px;
    padding: 0;
}

.simple-list li {
    margin-bottom: 3px;
}

/* ── Code / URL box ── */
.url-box {
    display: block;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    font-size: 13px;
    color: #0066cc;
    word-break: break-all;
    border: 1px solid #e0e0e0;
}

/* ── Guide Sections ── */
.guide-section {
    margin: 28px 0;
    padding-top: 10px;
}

.guide-section:first-of-type {
    margin-top: 20px;
}

/* ── Text helpers ── */
.text-green {
    color: #2e7d32;
}

/* ── Checkbox ── */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    padding: 14px 16px;
    background: #fafafa;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.2s;
}

.checkbox-label:hover {
    border-color: #0066cc;
}

.checkbox-label input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Error Box ── */
.error-box {
    background: #fef0f0;
    border-left: 4px solid #e53935;
    padding: 14px 16px;
    margin: 16px 0;
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    color: #c62828;
}

.tech-details-link {
    font-size: 12px;
    color: #999;
    text-decoration: underline;
    cursor: pointer;
}

.tech-details {
    font-family: monospace;
    font-size: 11px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    word-break: break-all;
    color: #666;
}

/* ── Spinner ── */
.spinner {
    border: 4px solid #e0e0e0;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* ── Device Selection ── */
.device-select-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 16px 0;
}

.device-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
}

.device-card:hover {
    border-color: #90caf9;
    background: #f8fbff;
}

.device-card.selected {
    border-color: #0066cc;
    background: #e8f0fe;
}

.device-card-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ccc;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s;
}

.device-card.selected .device-card-radio {
    border-color: #0066cc;
}

.device-card.selected .device-card-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0066cc;
}

.device-card-name {
    font-weight: 500;
    font-size: 15px;
    color: #333;
}

.device-card-badge {
    display: none;
    font-size: 11px;
    background: #4caf50;
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
}

.device-card.auto-detected .device-card-badge {
    display: inline-block;
}

.selected-os-info {
    background: #f0f7ff;
    border: 1px solid #d0e4ff;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 12px 0;
}

.device-info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.device-label {
    color: #777;
    font-size: 14px;
}

.device-value {
    font-weight: 600;
    color: #222;
    font-size: 14px;
}

/* ── Progress Bar ── */
.progress-container {
    margin: 24px 0;
}

.progress-bar {
    background: #e8e8e8;
    border-radius: 10px;
    height: 16px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #0066cc, #42a5f5);
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-status {
    text-align: center;
    color: #666;
    margin-top: 12px;
    font-size: 14px;
}
