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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000266 0%, #14005e 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header {
    background: linear-gradient(135deg, #3a9bf0 0%, #1dbbc4 100%);
    color: white;
    text-align: center;
    padding: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 150px;
    padding: 20px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}

.tab:hover {
    background: #e9ecef;
    color: #495057;
}

.tab.active {
    color: #4facfe;
    background: white;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.content {
    padding: 20px 30px;
}

.search-container {
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    padding: 20px 0;
    border-bottom: 2px solid #f8f9fa;
}

.search-box {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-box:focus {
    outline: none;
    border-color: #4facfe;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    margin-top: 10px;
    margin-left: 10px;
}

.quick-nav-btn {
    background: linear-gradient(135deg, #2143d8 0%, #40258a 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.quick-nav-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.collapse-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #4facfe;
    margin-left: 10px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.collapse-toggle:hover {
    background: rgba(79, 172, 254, 0.1);
}

.item-content.collapsed {
    display: none;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* No modo compacto, o conteúdo começa fechado,
   mas ainda pode ser aberto pelo toggleCollapse */
.compact-mode .item-content {
    display: none;
}

.compact-mode .item-content:not(.collapsed) {
    display: block;
}


.compact-toggle {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.compact-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.tab-content {
    display: none;
}

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

.item-group {
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.item-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.item-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-title {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.copy-btn {
    background: linear-gradient(135deg, #2143d8 0%, #40258a 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: #28a745;
}

.item-content {
    padding: 20px;
}

.item-text {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #495057;
    white-space: pre-wrap;
    border-left: 4px solid #4facfe;
}

.add-item {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.add-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

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

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h3 {
    margin-bottom: 20px;
    color: #495057;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    height: 200px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary {
    background: #4facfe;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    display: none;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 10px;
}

.delete-btn:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        border-bottom: 1px solid #e9ecef;
        min-width: unset;
    }
    
    .item-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}
.title-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.item-dependent {
    font-size: 1rem;
    color: #262829;
    font-weight: 500;
    background: linear-gradient(90deg, rgba(10,232,248,0.6), rgba(79,172,254,0.6));
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(79, 172, 254, 0.2);
    margin-right: 15px ;
}


.item-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-header {
    background: #faf9f8;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .item-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .item-buttons {
        justify-content: center;
    }
}