/* ── DJI Log Converter (page-specific overrides) ── */

/* ── Upload Screen ── */
.upload-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.upload-card {
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.drop-zone {
    border: 2px dashed rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 48px 24px;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(30,40,55,0.85);
    backdrop-filter: blur(12px);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #FEEEA5;
    background: rgba(254,238,165,0.08);
}

.drop-icon {
    font-size: 56px;
    color: #FEEEA5;
    margin-bottom: 12px;
}

.drop-text {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #fff;
}

.drop-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.upload-note {
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
}

/* ── Error Banner ── */
.error-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    text-align: left;
    border: 1px solid rgba(231,76,60,0.4);
    border-radius: 8px;
    background: rgba(30,40,55,0.85);
    backdrop-filter: blur(12px);
}

.error-banner > i {
    font-size: 18px;
    color: #e74c3c;
    flex-shrink: 0;
}

#error-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
    white-space: pre-line;
    word-break: break-word;
}

.error-close {
    padding: 0;
    border: none;
    background: none;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.error-close:hover {
    color: #e74c3c;
}

/* ── Loading Overlay ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #FEEEA5;
    border-radius: 50%;
    animation: dji-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

#loading-text {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
}

/* ── Results Screen ── */
.results-screen {
    padding: 100px 16px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Summary Cards ── */
.summary-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.summary-card {
    background: rgba(30,40,55,0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
}

.summary-card i {
    font-size: 22px;
    color: #FEEEA5;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.summary-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

/* ── Map ── */
.map-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

#map {
    width: 100%;
    height: 45vh;
    min-height: 280px;
    background: #0d1117;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 800;
    display: flex;
    gap: 4px;
}

.map-btn {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(26,35,50,0.85);
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
}

.map-btn.active {
    color: #FEEEA5;
    background: rgba(254,238,165,0.15);
    border-color: rgba(254,238,165,0.3);
}

/* ── Download Buttons ── */
.download-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.dl-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: #FEEEA5;
    color: #1a2332;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.dl-btn:hover { opacity: 0.85; }

.dl-btn-secondary {
    background: rgba(30,40,55,0.85);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.1);
}

.dl-btn-secondary:hover {
    background: rgba(40,52,70,0.95);
    color: #fff;
}

/* ── Data Table ── */
.table-container {
    border-radius: 12px;
    overflow: auto;
    background: rgba(30,40,55,0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    max-height: 55vh;
}

#data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
}

#data-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

#data-table th {
    background: rgba(20,28,40,0.95);
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#data-table td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.85);
}

#data-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

#data-table tr.row-warn td { color: #f0b90b; }
#data-table tr.row-error td { color: #e74c3c; }

#data-table td:last-child {
    white-space: normal;
    min-width: 200px;
    max-width: 400px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .results-screen { padding: 80px 10px 30px; }
    .summary-row { grid-template-columns: repeat(2, 1fr); }
    .summary-value { font-size: 14px; }
    #map { height: 35vh; min-height: 220px; }
    .download-row { gap: 6px; }
    .dl-btn { font-size: 12px; padding: 8px 8px; }
}
