body {
    font-family: 'Figtree', Arial, sans-serif;
    background-color: #020811;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 90px 20px 120px;
    border-bottom: 1px solid #111A28;
    background-color: transparent; /* Ajuste conforme necessário */
}

.logo {
    height: 30px; /* Ajuste conforme necessário */
}

.search-container {
    position: relative;
    width: 30%; /* Ajuste conforme necessário */
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 38%;
    transform: translateY(-50%);
    height: 20px; /* Ajuste conforme necessário */
    pointer-events: none; /* Impede interação com o ícone */
}

#search-bar {
    width: 87%;
    background: #111828;
    padding: 0.8rem 1rem 0.8rem 2.5rem; /* Espaçamento à esquerda para o ícone */
    font-size: 16px;
    border: none;
    border-radius: 4px;
    font-family: 'Figtree', Arial, sans-serif;
    color: white;
}

input::placeholder {
    padding-left: 5px;
}

#search-bar:focus {
    outline: none;
}

main {
    padding: 2rem;
}

#code-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 20px;
}

.code-item {
    background-color: #111828;
    border-radius: 5px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: left;
    overflow: hidden;
    position: relative;
    padding-bottom: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.code-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
}

.code-item h2 {
    color: #d8dee9;
    margin: 16px;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.code-item .category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-left: 16px;
    margin-bottom: 5px;
    margin-top: 20px;
}

.code-item .category-tag {
    background-color: #283143;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
}

.code-item .description {
    color: #d8dee9;
    padding-left: 16px;
    padding-right: 16px;
    margin: 10px 0;
    font-family: 'Figtree', Arial, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em;
    line-height: 1.5;
    word-wrap: break-word;
}
button{
    margin: 0.3rem 0;
    padding: 15px 20px;
    background-color: #283143;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex
;
    align-items: center;
    justify-content: center;
    font-family: 'Figtree', Arial, sans-serif;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #5e81ac;
}
.code-item button {
    background-color: #1E293B;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    min-width: 40px;
    height: 40px;
}

.code-item button:hover {
    background-color: #2E3B4E;
}

.code-item button img.icon {
    width: auto;
    height: 16px;
}

.code-item button.change-thumb {
    background-color: #1E293B;
    color: #d8dee9;
    padding: 8px 16px;
    white-space: nowrap;
    width: auto;
    height: auto;
    min-width: auto;
}

.code-item button.change-thumb:hover {
    background-color: #2E3B4E;
}

.code-item button.delete-code {
    background-color: #ff1d12;
}

.code-item button.delete-code:hover {
    background-color: #ba1a1a;
}

.button-group {
    padding: 0 16px;
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.modal {

    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    border-radius: 8px;
}

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

close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Alterando para aplicar apenas aos inputs dentro do modal e outras áreas específicas */
.modal-content textarea,
.modal-content input[type="text"],
.modal-content input[type="file"],
.search-container input[type="text"] {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Figtree', Arial, sans-serif;
}

.delete-code {
    background-color: red;
}

.delete-code:hover {
    background-color: darkred;
}

.upload-area {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:focus {
    outline: none;
    border-color: #4a90e2;
}

.upload-area.has-image {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
}

#preview-container {
    max-width: 100%;
    margin-top: 15px;
    display: none;
}

#preview-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.upload-info {
    color: #666;
    margin: 10px 0;
}

#thumb-upload {
    margin: 10px auto;
    display: block;
}

#save-thumb {
    width: 100%;
    margin-top: 20px;
}

/* Estilo para o botão flutuante */
.floating-btn-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 1000;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #5e81ac;
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.floating-menu {
    visibility: hidden;
    opacity: 0;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: all 0.3s ease;
    min-width: 200px;
    display: flex;
    align-items: flex-end;
}

.floating-menu.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.menu-btn {
    padding: 12px 20px;
    background-color: #283143;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Figtree', Arial, sans-serif;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
    text-align: center;
    transform: translateX(20px);
    transition: transform 0.3s ease, background-color 0.2s ease;
}

.menu-btn:hover {
    background-color: #5e81ac;
}

.categories-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.category-tag {
    background-color: #283143;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tag .remove {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
}

.category-tag .remove:hover {
    opacity: 1;
}

.categories-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1E293B;
    border: 1px solid #283143;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.categories-suggestions.visible {
    display: block;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    color: white;
}

.suggestion-item:hover {
    background-color: #283143;
}

#code-categories {
    width: 98%;
    padding: 0.9em;
    color: #131313;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Figtree', Arial, sans-serif;

}

#code-categories:focus {
    outline: none;
    border-color: #5e81ac;
}

.category-warning {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 100%;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.category-warning.visible {
    display: block;
    opacity: 1;
    visibility: visible;
    margin-bottom: 20px;
}

/* Menu Lateral */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 60px;
    background-color: #111828;
    transition: transform 0.3s ease;
    z-index: 1000;
    padding-top: 20px;
}

.sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 0 10px;
    margin-bottom: 20px;
}

.close-sidebar {
    background: none;
    border: none;
    color: #d8dee9;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-sidebar:hover {
    background-color: #283143;
    border-radius: 50%;
}

.sidebar-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-content li {
    margin: 5px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d8dee9;
    text-decoration: none;
    padding: 10px;
    border-radius: 50%;
    margin: 5px 10px;
    transition: background-color 0.3s;
}

.sidebar-item:hover {
    background-color: #283143;
}

.sidebar-item.active {
    background-color: #283143;
    color: #5e81ac;
}

.sidebar-item i {
    font-size: 20px;
}

.toggle-sidebar {
    position: fixed;
    left: 15px;
    top: 35px;
    background: none;
    border: none;
    color: #d8dee9;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-sidebar:hover {
    background-color: #283143;
    border-radius: 50%;
}
#main-content {
    margin-left: 60px;
    transition: margin-left 0.3s ease;
}

#main-content.full-width {
    margin-left: 0;
}

/* Estilos para a página de changelog */
.changelog-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.changelog-item {
    background: rgba(30, 33, 43, 0.95);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.changelog-header {
    margin-bottom: 24px;
}

.version-info h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 500;
}

.latest {
    background: #00ff9d;
    color: #000;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.date {
    color: #8b8b8b;
    font-size: 14px;
    display: block;
    margin-top: 8px;
}

.hash {
    background: rgba(139, 139, 139, 0.1);
    color: #8b8b8b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
}

.changelog-content h4 {
    color: #fff;
    margin: 24px 0 16px;
    font-size: 18px;
    font-weight: 500;
}

.changelog-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-content li {
    color: #8b8b8b;
    margin: 12px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.release-entry {
    background: #1e2432;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.release-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2E3B4E;
}

.release-header h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.release-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.release-tag.latest {
    background: #1a4731;
    color: #4ade80;
}

.release-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.commit-hash {
    font-family: monospace;
    background: #2E3B4E;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.release-content h3 {
    color: #fff;
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem;
}

.release-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.release-content li {
    color: #94a3b8;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.release-content li::before {
    content: "•";
    color: #5e81ac;
}

/* Ajuste para o header na página de changelog */
header h1 {
    color: #fff;
    margin: 0;
    font-size: 1.75rem;
}

/* Marca o item ativo no menu */
.sidebar-item.active {
    background: #2E3B4E;
    color: #fff;
}
