body { margin: 0; }

#app-description {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('/preview.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#app-description::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

#app-description > * {
    position: relative;
    z-index: 1;
}

#app-description h1 {
    font-family: sans-serif;
    font-size: 2em;
    color: #ffffff;
    margin-bottom: 0.5em;
}

#app-description p {
    color: #cccccc;
    font-family: sans-serif;
    font-size: 1.1em;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 1em;
}

#app-description ul {
    list-style: none;
    padding: 0;
    color: #a0a0a0;
    font-family: sans-serif;
    font-size: 0.95em;
    line-height: 2;
}

iframe#app {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    display: none;
}

/* Footer location display */
#current-location {
    display: none;
    align-items: center;
    gap: 6px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#current-location-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ddd;
}

#save-location-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}

#save-location-btn:hover { color: #f0c040; }
#save-location-btn.saved { color: #f0c040; }

/* Saved locations panel */
#saved-panel-btn {
    background: none;
    border: none;
    color: #6b9bd1;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    font-family: inherit;
    flex-shrink: 0;
}

#saved-panel-btn:hover { color: #90baf0; }

#saved-panel {
    display: none;
    position: fixed;
    bottom: 38px;
    left: 12px;
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 200px;
    max-width: 280px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1500;
    font-family: sans-serif;
    font-size: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#saved-panel.open { display: block; }

#saved-panel-header {
    padding: 2px 14px 8px;
    color: #888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 4px;
}

.saved-item {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    cursor: pointer;
    color: #ccc;
    gap: 8px;
}

.saved-item:hover { background: rgba(255,255,255,0.06); }

.saved-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-item-delete {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.saved-item-delete:hover { color: #e05050; }

#saved-panel-empty {
    padding: 8px 14px;
    color: #555;
    font-style: italic;
}

/* Methodology modal */
#methodology-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

#methodology-modal.open {
    display: flex;
}

#methodology-box {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 28px 32px;
    max-width: 640px;
    width: calc(100% - 48px);
    max-height: 80vh;
    overflow-y: auto;
    color: #ccc;
    font-family: sans-serif;
    font-size: 0.92em;
    line-height: 1.6;
    position: relative;
}

#methodology-box h2 {
    margin: 0 0 12px;
    font-size: 1.2em;
    color: #fff;
}

#methodology-box h3 {
    margin: 20px 0 8px;
    font-size: 0.95em;
    color: #6b9bd1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#methodology-box p {
    margin: 0 0 10px;
    color: #bbb;
}

#methodology-box table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    margin-bottom: 6px;
}

#methodology-box th {
    text-align: left;
    color: #888;
    font-weight: normal;
    padding: 4px 8px 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#methodology-box td {
    padding: 5px 8px 5px 0;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

#methodology-box .limitation-title {
    color: #e0e0e0;
    font-weight: bold;
    margin: 14px 0 4px;
}

#methodology-box .limitation-title:first-of-type {
    margin-top: 0;
}

#methodology-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.4em;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#methodology-close:hover {
    color: #fff;
}
