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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: #0a0e27;
    color: #e0e6f1;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #8892b0;
    margin-bottom: 3rem;
}

.storage-overview {
    margin-bottom: 3rem;
}

.storage-overview h2 {
    color: #e0e6f1;
    margin-bottom: 1.5rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.storage-card {
    background: #1a1f3a;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #2a3052;
    transition: all 0.3s ease;
}

.storage-card:hover {
    transform: translateY(-2px);
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.storage-card h3 {
    color: #e0e6f1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.storage-meter {
    width: 100%;
    height: 8px;
    background: #2a3052;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.storage-info {
    font-size: 0.9rem;
    color: #8892b0;
    margin-bottom: 0.25rem;
}

.item-count {
    font-size: 0.85rem;
    color: #64698b;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #2a3052;
    color: #e0e6f1;
}

.btn-secondary:hover {
    background: #353a5f;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #2a3052;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: #8892b0;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #e0e6f1;
}

.tab-btn.active {
    color: #667eea;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.tab-content {
    background: #1a1f3a;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #2a3052;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #0a0e27;
    border: 1px solid #2a3052;
    border-radius: 8px;
    color: #e0e6f1;
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
}

.storage-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #2a3052;
}

th {
    background: #0a0e27;
    color: #8892b0;
    font-weight: 600;
}

td {
    color: #e0e6f1;
}

tr:hover td {
    background: #0a0e27;
}

.value-preview {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    background: #2a3052;
    border: none;
    border-radius: 6px;
    color: #e0e6f1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #353a5f;
}

.bulk-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #2a3052;
}

.bulk-actions.hidden {
    display: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: #1a1f3a;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid #2a3052;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}

.close {
    color: #8892b0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #e0e6f1;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #8892b0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #0a0e27;
    border: 1px solid #2a3052;
    border-radius: 8px;
    color: #e0e6f1;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.floating-add {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
}

.btn-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-floating:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.indexeddb-list {
    display: grid;
    gap: 1rem;
}

.db-card {
    background: #0a0e27;
    border: 1px solid #2a3052;
    border-radius: 8px;
    padding: 1.5rem;
}

.db-card h3 {
    color: #e0e6f1;
    margin-bottom: 0.5rem;
}

.db-info {
    color: #8892b0;
    font-size: 0.9rem;
}

.size-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #2a3052;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #e0e6f1;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }

    .value-preview {
        max-width: 150px;
    }
}