body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    line-height: 1.6;
}
h2 {
    color: #00aaff;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px; /* Garantir espaço abaixo do título */
}
h3 {
    color: #00aaff;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

.logo-builder-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
    padding-top: 10px;
    position: relative;
    min-height: 500px; /* Garantir altura mínima para o container */
}

.controls-panel {
    flex: 2;
    min-width: 350px;
    max-width: calc(100% - 350px); /* Limitar largura para acomodar o preview */
    background-color: #2c2c2c;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-panel {
    flex: 1;
    min-width: 300px; /* Aumentar largura mínima */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #2c2c2c;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    
    /* Opção 1: Sticky com posição fixa sem transformação */
    position: sticky;
    top: 100px; /* Distância do topo, abaixo do h2 */
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.row-group {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    align-items: stretch; /* Make all items the same height */
}

.row-group .control-section {
    min-width: 0;
}

.control-section {
    padding: 0;
    background-color: #363636;
    padding: 12px; /* Reduce padding to match heights */
    border-radius: 6px;
    border: 1px solid #4a4a4a;
    display: flex;
    flex-direction: column;
}

.control-section:last-child {
    margin-bottom: 0;
}

.control-section label {
    display: block;
    margin-bottom: 10px;
    color: #00aaff;
    font-weight: 500;
    font-size: 1em;
}

.settings-row {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.number-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    font-size: 0.9em;
    color: #ccc;
}

.visual-selector-container {
    display: flex;
    gap: 8px;
    padding: 5px;
    background-color: #3f3f3f;
    border-radius: 4px;
    border: 1px solid #555;
    min-width: 120px;
    overflow-y: hidden;
    overflow-x: auto;
    white-space: nowrap;
}

.visual-selector-item {
    flex: 0 0 auto;
    color: #ccc;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    box-sizing: border-box;
    padding: 0;
    margin: 2px;
}

.visual-selector-item img {
    display: block;
    width: 150%;
    height: 150%;
    object-fit: cover;
    border-radius: 3px;
    margin: -35% -17% -50% -10%;
}

.visual-selector-item:hover {
    background-color: #5a5a5a;
    border-color: #777;
}

.visual-selector-item.selected {
    background-color: #007acc;
    border-color: #00aaff;
    color: #fff;
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.7);
}

.color-picker-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3f3f3f;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
}

.color-picker-button:hover {
    border-color: #777;
}

.color-picker-button.active {
    border-color: #00aaff;
    box-shadow: 0 0 4px rgba(0, 170, 255, 0.7);
}

.color-picker-button.small {
    padding: 5px;
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    background-color: #fff;
}

.color-picker-button.small .color-preview {
    width: 18px;
    height: 18px;
}

.dropdown-arrow {
    margin-right: 8px;
    color: #aaa;
    font-size: 12px;
}

.color-popup {
    display: none; /* Start hidden */
    position: absolute;
    z-index: 1000;
    background-color: #2c2c2c;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px;
    margin-top: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    width: 180px;
    flex-wrap: wrap;
    gap: 6px;
}

.color-popup.active {
    display: flex;
}

.color-option {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.15s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #00aaff;
    box-shadow: 0 0 6px rgba(0, 170, 255, 0.7);
}

.custom-number-input {
    display: flex;
    align-items: center;
    height: 32px;
    background-color: #3f3f3f;
    border: 1px solid #555;
    border-radius: 4px;
    overflow: hidden;
}

.custom-number-input.small {
    height: 28px;
}

.custom-number-input button {
    width: 28px;
    height: 100%;
    border: none;
    background-color: #4a4a4a;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-number-input button:hover {
    background-color: #5a5a5a;
}

.custom-number-input span {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 14px;
    padding: 0 5px;
}

.text-input-row {
    margin-bottom: 12px;
}

.text-setting {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-setting select {
    flex: 1;
    height: 28px;
    background-color: #3f3f3f;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    padding: 0 8px;
}

input[type="text"] {
    width: 100%;
    height: 36px;
    background-color: #3f3f3f;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    padding: 0 10px;
    font-size: 14px;
}

input[type="checkbox"] {
    margin-right: 8px;
}

#logo-preview-image {
    max-width: 100%;
    width: 300px; /* Aumentar para 300px */
    height: 300px; /* Aumentar para 300px */
    object-fit: contain;
    border: 1px solid #444;
    background-color: #1e1e1e;
    margin-bottom: 15px;
    display: block;
}

.preview-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

#generated-url-container {
    margin-top: 15px;
    width: 100%;
}

#generated-url-container label {
    display: block;
    margin-bottom: 5px;
    color: #e0e0e0;
    font-weight: bold;
    font-size: 0.9em;
}

#generated-url {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #3f3f3f;
    color: #ccc;
    font-size: 0.8em;
    word-break: break-all;
    box-sizing: border-box;
    resize: none;
}

.warning {
    color: #ffcc00;
    font-size: 0.85em;
    font-weight: normal;
}

.pattern-section {
    flex: 3 !important; /* 75% width */
}

.colors-section {
    flex: 1 !important; /* 25% width */
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Fix the row group and color section styles */
.row-group {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    align-items: stretch; /* Make all items the same height */
}

/* Make color buttons row take full height of the parent container */
.color-buttons-row {
    display: flex;
    gap: 12px;
    flex: 1; /* Take remaining space */
    align-items: center; /* Center buttons vertically */
}

/* Adjust the color button container */
.color-button-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1; /* Make buttons fill available width */
}

/* Navigation Styles */
.main-nav {
    background-color: #252525;
    border-bottom: 1px solid #444;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Aumentar tamanho e dar zoom na logo */
.nav-logo {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover; /* Manter proporções corretas */
    object-position: center; /* Centralizar imagem */
    transform: scale(3); /* Aplicar zoom de 150% */
    margin: 10px; /* Espaço ao redor para compensar o zoom */
    margin-right: -10px;
}

/* Ajustar o container da logo */
.logo {
    display: flex;
    align-items: center;
    gap: 20px; /* Aumentar espaço entre logo e texto */
    color: #00aaff;
    font-weight: 500;
    font-size: 1.2em;
    overflow: hidden; /* Evitar que o zoom ultrapasse os limites */
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
    background-color: #333;
    color: #00aaff;
}

.nav-links a.active {
    background-color: #00aaff;
    color: #fff;
}

/* Add space below navigation */
body {
    padding-top: 10px;
}

/* Add container styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Existing reference page styles */
.logo-container, .logo-type-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.logo-item, .logo-type-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #2c2c2c;
    border-radius: 6px;
    padding: 10px;
    width: 140px;
    transition: transform 0.2s, background-color 0.2s;
}

.logo-item:hover, .logo-type-item:hover {
    background-color: #363636;
    transform: translateY(-3px);
}

.logo-image, .logo-type-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background-color: #1e1e1e;
    border-radius: 4px;
}

.logo-name, .logo-type-name {
    margin-top: 8px;
    font-size: 0.8em;
    text-align: center;
    color: #e0e0e0;
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;
}

.color-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.color-item {
    display: flex;
    align-items: center;
    background-color: #2c2c2c;
    border-radius: 6px;
    padding: 8px 12px;
    width: 200px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #555;
}

.color-id {
    margin: 0;
    font-size: 0.9em;
    color: #e0e0e0;
}

/* Estilos para a tabela de parâmetros de API */
.api-params-section {
    margin-bottom: 30px;
    overflow-x: auto;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2c2c2c;
    border-radius: 6px;
    overflow: hidden;
}

.params-table th,
.params-table td {
    padding: 10px 15px;
    border: 1px solid #444;
    text-align: left;
}

.params-table th {
    background-color: #363636;
    color: #00aaff;
    font-weight: 500;
}

.params-table tr:nth-child(even) {
    background-color: #323232;
}

.params-table tr:hover {
    background-color: #3a3a3a;
}

/* API URL section */
.api-url-section {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #2c2c2c;
    border-radius: 6px;
    border: 1px solid #444;
}

.api-base-url {
    display: block;
    padding: 10px;
    background-color: #1e1e1e;
    border-radius: 4px;
    color: #00aaff;
    font-family: monospace;
    margin-bottom: 10px;
    overflow-x: auto;
}

.api-example {
    margin-top: 10px;
    font-size: 0.9em;
}

.api-example a {
    color: #00aaff;
    text-decoration: none;
}

.api-example a:hover {
    text-decoration: underline;
}

/* Para dispositivos menores, manter responsividade */
@media (max-width: 1200px) {
    .preview-panel {
        position: relative;
        top: 0;
        max-height: none;
        margin-top: 20px;
        width: 100%;
    }
    
    .controls-panel {
        max-width: 100%;
    }
}