* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}


.container1 {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.generator-box {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0;
    position: relative;
    border: 2px solid #9333ea;
}

.header {
    background: #9333ea;
    padding: 40px;
    text-align: center;
    border-bottom: 2px solid rgba(147, 51, 234, 0.1);
    margin-bottom: 0;
    width: 100%;
}

.header h1 {
    font-family: 'MedievalSharp', cursive;
    font-size: 2.5em;
    margin: 0;
    text-align: center;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.2em;
    margin: 10px 0 0;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    text-align: center;
    margin: 40px auto;
    max-width: 800px;
    color: #333333;
    font-family: 'MedievalSharp', cursive;
    font-size: 2.2em;
    text-shadow: none;
}

.input-section {
    padding: 40px;
    background: #f8f9fa;
    margin-top: 60px;
    border-top: 1px solid rgba(147, 51, 234, 0.3);
}

label {
    display: block;
    color: #333333;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1.1em;
}

select {
    width: 100%;
    padding: 15px;
    border: 2px solid #9333ea;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    background: #ffffff;
    color: #333333;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239333ea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select option:checked,
select option:focus,
select option:active {
    background: #9333ea;
    color: #ffffff;
    font-weight: bold;
}

select:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.3);
    outline: none;
}

select option {
    background-color: #ffffff;
    color: #333333;
    padding: 15px;
    font-size: 16px;
}

select option:hover {
    background-color: #f8f9fa;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
    padding: 15px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    background: #f8f9fa;
    color: #333333;
}

.checkbox-wrapper:hover {
    background: #f0f0f0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #9333ea;
    border-radius: 6px;
    cursor: pointer;
}

.primary-btn {
    background: #9333ea;
    color: white;
    width: 100%;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.primary-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.secondary-btn {
    background: #f8f9fa;
    color: #333333;
    border: 2px solid #9333ea;
}

.secondary-btn:hover {
    background: #f0f0f0;
}

.name-display h2,
.name-meaning h3 {
    color: #9333ea;
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'MedievalSharp', cursive;
    letter-spacing: 1px;
}

.name-meaning h3 {
    font-size: 1.5em;
    margin-top: 30px;
}

.generated-name,
.meaning-text {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
    font-style: italic;
    color: #333333;
    font-size: 1.3em;
    border: 1px solid #9333ea;
    font-family: 'MedievalSharp', cursive;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.generated-name {
    font-weight: bold;
    letter-spacing: 1px;
    background: #f0f0f0;
}

.output-section {
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid rgba(147, 51, 234, 0.3);
    margin-top: 30px;
}

.favorites-section {
    padding: 30px;
    border-top: 2px solid rgba(147, 51, 234, 0.1);
}

.favorites-section h2 {
    color: #333333;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-family: 'MedievalSharp', cursive;
}

#favorites-list {
    display: grid;
    gap: 15px;
}

.favorite-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    position: relative;
    border: 1px solid #9333ea;
    color: #333333;
}

.favorite-item button {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px;
    min-width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #9333ea;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.favorite-item:hover button {
    opacity: 1;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease;
}

.message.success {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
}

button {
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

button span {
    font-size: 1.2em;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .header {
        padding: 30px;
        margin-bottom: 40px;
    }
    
    .input-section {
        margin-top: 40px;
        padding: 30px;
    }
    
    .name-display h2 {
        font-size: 1.6em;
    }
    
    .name-meaning h3 {
        font-size: 1.3em;
    }
    
    .generated-name,
    .meaning-text {
        padding: 15px;
        font-size: 1.2em;
    }
    
    .options, .checkboxes {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    select {
        font-size: 16px;
        padding: 12px;
    }
    
    .input-section, .output-section {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 1.8em;
        margin: 30px auto;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 25px;
        margin-bottom: 30px;
    }
    
    .input-section {
        margin-top: 30px;
        padding: 20px;
    }
    
    .name-display h2 {
        font-size: 1.4em;
    }
    
    .name-meaning h3 {
        font-size: 1.2em;
    }
    
    .generated-name,
    .meaning-text {
        padding: 12px;
        font-size: 1.1em;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.6em;
        margin: 20px auto;
        padding: 0 15px;
    }
}
