:root { --main-blue: #00e5ff; --bg: #0b141a; --card: #16262e; }
body { background: var(--bg); color: #cfd8dc; font-family: sans-serif; margin: 0; }
.container { max-width: 500px; margin: auto; padding: 20px; }
h1 { text-align: center; color: var(--main-blue); letter-spacing: 1px; }

.floating-data-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-top: 0;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    z-index: 220;
    background: rgba(11, 20, 26, 0.92);
}

.search-container { position: relative; margin-bottom: 20px; }
.search-box { display: flex; }
.search-box input { background: #000; border: 1px solid var(--main-blue); color: #fff; padding: 10px; border-radius: 4px; }
#item-search { flex-grow: 1; }

.suggestions {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card); border: 1px solid var(--main-blue);
    z-index: 100; max-height: 200px; overflow-y: auto; display: none;
}
.suggestion-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #22343d;
}
.suggestion-row:hover { background: rgba(0, 229, 255, 0.08); }
.suggestion-name {
    flex: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}
.suggestion-name:hover { color: var(--main-blue); }
.suggestion-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
}
.suggestion-qty-btn {
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: var(--main-blue);
}
.suggestion-qty-value {
    min-width: 18px;
    text-align: center;
    font-weight: bold;
    color: #eef7f8;
}

.item-row { 
    display: flex; align-items: center; background: var(--card); 
    margin-bottom: 8px; padding: 12px; border-radius: 4px;
    border-left: 4px solid var(--main-blue);
}
.item-row.completed { opacity: 0.3; }
.item-info { flex-grow: 1; cursor: pointer; padding: 0 10px; }
.qty { color: #ff9100; font-weight: bold; margin-right: 5px; }
.btn-delete { background: transparent; border: none; color: #ff4444; cursor: pointer; font-size: 1.4em; line-height: 1; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; justify-content: center; align-items: center; }
.modal-content { background: var(--card); padding: 20px; border: 1px solid var(--main-blue); border-radius: 8px; width: 85%; max-width: 350px; text-align: center; }
.modal-panel {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    text-align: left;
}
.modal-panel-title {
    display: block;
    margin-bottom: 8px;
    color: #eef7f8;
}
.modal-panel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-item-link,
.modal-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 5px;
    background: rgba(0, 229, 255, 0.12);
    color: #e8f7fa;
    text-decoration: none;
    line-height: 1.2;
}
.modal-item-link:hover {
    background: rgba(0, 229, 255, 0.2);
}
.modal-item-icon {
    flex: 0 0 auto;
    width: 18px;
    text-align: center;
}
button { background: transparent; border: 1px solid var(--main-blue); color: var(--main-blue); padding: 8px 15px; cursor: pointer; margin-top: 15px; border-radius: 4px; }

.data-modal-content {
    max-width: 420px;
}

.data-modal-content h3 {
    margin: 0 0 8px;
    color: #eef7f8;
}

.data-modal-help {
    margin: 0 0 10px;
    opacity: 0.9;
    font-size: 0.92rem;
}

.data-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

#import-json-input {
    display: none;
}

.data-modal-status {
    min-height: 20px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #d6f4fa;
}