* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #12151a 0%, #000000 100%);
    color: white;
    text-align: center;
    padding: 20px;
    margin: 0;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 10px auto;
    background: rgb(129 121 121 / 10%);
    border-radius: 20px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

h1 {
    margin-bottom: 30px;
}

.info {
    background: rgb(93 99 114 / 30%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.method-card {
    background: rgb(18 32 82 / 15%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f32b;
}

.method-card:hover {
    border-color: #667eea;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.4);
}

.method-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.method-desc {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.info-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #667eea;
    color: #c8d6ff;
    border-radius: 30px;
    padding: 4px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 6px rgba(102, 126, 234, 0.2);
    margin-left: 8px;
    white-space: nowrap;
}

.info-btn:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.03);
}

.info-btn::before {
    content: "ⓘ";
    font-size: 16px;
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    background: #1a1e26;
    border-radius: 24px;
    padding: 30px 28px;
    border: 1px solid #667eea55;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    text-align: left;
    position: relative;
    animation: modalFade 0.3s ease;
}

.modal-box::-webkit-scrollbar {
    width: 6px;
}

.modal-box::-webkit-scrollbar-track {
    background: #2a2e3a;
    border-radius: 10px;
}

.modal-box::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

@keyframes modalFade {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-box h2 {
    margin-top: 0;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #b8caff;
    border-bottom: 1px solid #334;
    padding-bottom: 12px;
}

.modal-box .section {
    margin: 18px 0 12px 0;
    font-weight: 700;
    color: #b8caff;
    font-size: 16px;
    border-left: 3px solid #667eea;
    padding-left: 12px;
}

.modal-box ul {
    margin: 0 0 12px 0;
    padding-left: 22px;
}

.modal-box ul li {
    margin-bottom: 6px;
    line-height: 1.6;
    color: #d0d8e8;
    font-size: 14px;
}

.modal-box ul li strong {
    color: #b8caff;
}

.modal-box ul li code {
    background: #2a2e3a;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #b8caff;
    font-family: 'Courier New', monospace;
}

.modal-box .note {
    background: rgba(102, 126, 234, 0.12);
    border-left: 3px solid #667eea;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 13px;
    color: #c8d6ff;
}

.modal-box .close-modal {
    background: #667eea;
    border: none;
    color: white;
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin-top: 18px;
    transition: 0.2s;
    width: 100%;
    text-align: center;
}

.modal-box .close-modal:hover {
    background: #7b92ff;
    transform: scale(1.01);
}

.modal-box .close-icon {
    position: absolute;
    top: 5px;
    right: 18px;
    font-size: 26px;
    line-height: 1;
    color: #8899bb;
    cursor: pointer;
}

.modal-box .close-icon:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-box .link {
    color: #7b92ff;
    text-decoration: underline;
    word-break: break-all;
}

.modal-box .link:hover {
    color: #a8bbff;
}

.warning-text {
    display: block;
    margin-top: 10px;
    padding: 12px 16px;
    background: rgba(255, 60, 60, 0.18);
    border-left: 5px solid #ff4444;
    border-radius: 8px;
    color: #ff9999;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.5;
    text-shadow: 0 0 8px rgba(255, 60, 60, 0.3);
}

.warning-text strong {
    color: #ff6666;
}

button,
.file-label,
select {
    background: #574c93;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    border-radius: 25px;
    cursor: pointer;
    margin: 5px;
    transition: transform 0.2s;
    display: inline-block;
}

select {
    background: #0a0a0a;
    color: #e0e0e0;
    cursor: pointer;
    width: 100%;
    padding: 10px 15px;
    border-radius: 15px;
    border: 1px solid #2a2e3a;
    font-size: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

select:hover {
    border-color: #667eea;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.4);
}

select option {
    background: #0a0a0a;
    color: #e0e0e0;
    padding: 8px;
}

button:hover,
.file-label:hover {
    transform: scale(1.02);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-danger {
    background: linear-gradient(135deg, #a32525 0%, #f5576c 100%);
}

.btn-muted {
    background: #2a2745 !important;
    opacity: 0.55;
    filter: grayscale(0.5);
    box-shadow: none;
}

button:disabled.btn-muted,
button:disabled {
    cursor: not-allowed;
}

.btn-muted:hover {
    opacity: 0.75;
    filter: grayscale(0.3);
}

.btn-ready {
    background: linear-gradient(135deg, #2f7a3e 0%, #44aa5c 100%) !important;
    box-shadow: 0 0 0 3px rgba(68, 170, 92, 0.25), 0 0 18px rgba(68, 170, 92, 0.65), 0 6px 16px rgba(0, 0, 0, 0.4);
    font-weight: 700;
    letter-spacing: 0.3px;
    animation: btnPulse 1.8s ease-in-out infinite;
}

@keyframes btnPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 3px rgba(68, 170, 92, 0.25), 0 0 18px rgba(68, 170, 92, 0.65), 0 6px 16px rgba(0, 0, 0, 0.4);
    }

    50% {
        transform: scale(1.035);
        box-shadow: 0 0 0 5px rgba(68, 170, 92, 0.18), 0 0 28px rgba(68, 170, 92, 0.85), 0 6px 20px rgba(0, 0, 0, 0.45);
    }
}

.btn-muted {
    background: #3a3560 !important;
    opacity: 0.75;
    filter: saturate(0.7);
}

.notice-link {
    color: #88ffaa;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.notice-link:hover {
    color: #26ff26;
}

.step-locked {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.6);
    transition: opacity 0.35s ease, filter 0.35s ease;
}

.step-revealed {
    animation: stepReveal 0.4s ease;
}

@keyframes stepReveal {
    0% {
        opacity: 0;
        transform: translateY(-6px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.dl-toggle,
.dl-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
}

.dl-toggle input[type="checkbox"],
.dl-list input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #667eea;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dl-toggle input[type="checkbox"]:checked,
.dl-list input[type="checkbox"]:checked {
    background: #00cc66;
    border-color: #00cc66;
    box-shadow: 0 0 8px rgba(0, 204, 102, 0.5);
}

.dl-toggle input[type="checkbox"]:checked::after,
.dl-list input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dl-panel {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #2a2e3a;
}

.dl-panel.hidden {
    display: none;
}

.dl-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.dl-list label {
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}

.dl-list label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dl-size {
    color: #888;
    font-size: 12px;
    margin-left: 4px;
}

.dl-hint {
    display: none;
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 170, 0, 0.12);
    border-left: 4px solid #ffaa00;
    color: #ffcc88;
    font-size: 13px;
    line-height: 1.5;
}

.dl-hint.active {
    display: block;
}

.device-hint {
    display: none;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0, 204, 102, 0.12);
    border-left: 3px solid #44aa5c;
    color: #88ffaa;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    animation: hintFade 0.3s ease;
}

.device-hint.active {
    display: inline-block;
}

@keyframes hintFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notice {
    background: rgba(0, 204, 102, 0.12);
    border-left: 4px solid #00cc66;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 20px 0;
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    color: #b8ffd0;
}

.notice strong {
    color: #88ffaa;
}

.notice code {
    background: #2a2e3a;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #b8caff;
    font-family: 'Courier New', monospace;
}

.step-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.step-row:last-child {
    border-bottom: none;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3a4887 0%, #292a2c 100%);
    color: white;
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    text-align: left;
}

.step-content b {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.step-content small {
    font-size: 13px;
    opacity: 0.7;
    line-height: 1.4;
    display: block;
    color: #bbb9b9;
}

.progress-bar-outer {
    width: 100%;
    height: 22px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 11px;
    margin: 12px 0;
    overflow: hidden;
    position: relative;
    display: none;
}

.progress-bar-outer.active {
    display: block;
}

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #00cc66, #00ff88);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #003322;
}

.status {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    display: none;
    font-size: 14px;
    text-align: left;
    line-height: 1.5;
}

.status.active {
    display: block;
}

.status.success {
    background: rgba(0, 255, 0, 0.15);
    border: 1px solid #00cc66;
    color: #88ffaa;
}

.status.error {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid #ff4444;
    color: #ff9999;
}

.status.info {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid #667eea;
    color: #c8d6ff;
}

.status.warning {
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid #ffaa00;
    color: #ffcc88;
}

.detected-info {
    background: rgb(99 106 137 / 15%);
    border: 1px solid #2d3455;
    border-radius: 10px;
    padding: 0 0 15px 15px;
    margin: 15px 0;
    text-align: left;
    font-size: 14px;
    display: none;
    line-height: 1.6;
}

.detected-info.active {
    display: block;
}

.detected-info b {
    color: #b8caff;
}

.driver-link {
    color: #01ff4f;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.driver-link:hover {
    color: #99b3ff;
    cursor: pointer;
}

hr {
    margin: 20px 0;
    border-color: rgba(255, 255, 255, 0.2);
}

.footer {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 20px;
}