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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e1e1e1 0%, #e9e9e9 100%);
    min-height: 100vh;
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: rgb(36, 36, 36);
}

header h1 {
    /*font-size: 3rem;*/
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.generator-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

input[type="text"] {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9 !important;
    outline: none;
    -webkit-appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    min-width: 0; 
}

.preview-container {
    width: 100%;
    height: 200px;
    max-height: 200px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    display: block; /* Cambiado a block */
    text-align: center; /* Centra el contenido inline-block */
    padding: 20px;
    overflow-x: auto; 
}

/* Estilo para la barra de scroll en el contenedor de la vista previa */
.preview-container::-webkit-scrollbar {
    height: 6px;
}

.preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.preview-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.signature-preview {
    font-family: 'Modernline', cursive;
    font-size: 48px;
    color: #000;
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 10px 20px; 
    display: inline-block; /* Permite que text-align:center funcione */
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

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

.txt-c, .signature-gallery {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 40px;

}
.container-grid {
    height: 300px;
    overflow-y: auto;
}

.signature-gallery h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
   /* font-size: 2rem;*/
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.gallery-signature {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.gallery-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.feature {
    text-align: center;
}

.feature .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.feature p {
    color: #666;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .generator-section {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
    
    .control-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .signature-preview {
        font-size: 32px;
    }
    
    .features {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .generator-section {
        padding: 15px;
    }
    
    .signature-preview {
        font-size: 24px;
    }
    
    .download-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}
