/* Username Generator - Phase 1 Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header {
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 300;
}

.generator-section {
    margin-bottom: 30px;
}

.controls {
    margin-bottom: 40px;
}

.control-group {
    margin-bottom: 30px;
}

.control-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
}

.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.syllable-slider {
    flex: 1;
    max-width: 300px;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.syllable-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.syllable-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.syllable-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.syllable-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
    min-width: 30px;
}

.vibe-container {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.vibe-selector {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    outline: none;
}

.vibe-selector:hover {
    border-color: #667eea;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.vibe-selector:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.generate-button:active {
    transform: translateY(0);
}

.output-section {
    background: rgba(247, 250, 252, 0.8);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #e2e8f0;
}

.generated-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
}

.placeholder-text {
    font-size: 1.2rem;
    color: #a0aec0;
    font-weight: 400;
    font-style: italic;
}

.name-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.syllable-count-display {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.footer {
    color: #a0aec0;
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .generated-name {
        font-size: 2rem;
    }
    
    .slider-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .syllable-slider {
        max-width: 250px;
    }
}

/* Animation for generated names */
.name-animate {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Definition Section Styles */
.definition-section {
    background: rgba(247, 250, 252, 0.6);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    border: 2px solid #e2e8f0;
    animation: fadeInScale 0.4s ease-out;
}

.definition-header {
    margin-bottom: 20px;
}

.definition-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.definition-content {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.definition-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
}

.loading-spinner {
    font-size: 1.2rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.definition-result {
    text-align: center;
    width: 100%;
}

.definition-word {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.definition-text {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 0 20px;
}

.definition-source {
    font-size: 0.85rem;
    color: #a0aec0;
    font-style: italic;
}

.definition-not-found {
    text-align: center;
    color: #718096;
}

.not-found-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.not-found-text {
    font-size: 1rem;
    line-height: 1.5;
}

.not-found-text strong {
    color: #667eea;
    font-weight: 600;
}

/* Action Buttons - Consistent with Main Theme */
.name-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.action-button {
    padding: 14px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
}

.action-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.action-button:active:not(:disabled) {
    transform: translateY(0);
}

.action-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.back-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.back-button:hover:not(:disabled) {
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.back-button:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.save-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.save-button:hover:not(:disabled) {
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.save-button.saved {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 6px 12px rgba(72, 187, 120, 0.3);
}

.save-button.saved:hover:not(:disabled) {
    box-shadow: 0 8px 16px rgba(72, 187, 120, 0.4);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.save-button:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clear-button {
    background: rgba(247, 250, 252, 0.9);
    color: #4a5568;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.clear-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    border-color: #cbd5e0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: #2d3748;
}

.clear-button:disabled {
    background: rgba(247, 250, 252, 0.5);
    color: #a0aec0;
    border-color: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Saved Names Section - Consistent with Output Section */
.saved-names-section {
    background: rgba(247, 250, 252, 0.8);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #e2e8f0;
    margin: 30px 0;
}

.saved-names-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.saved-names-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
}

.saved-count {
    font-size: 0.9rem;
    color: #718096;
    background: rgba(102, 126, 234, 0.1);
    padding: 6px 16px;
    border-radius: 25px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.saved-names-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
}

.saved-names-list::-webkit-scrollbar {
    width: 6px;
}

.saved-names-list::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.5);
    border-radius: 3px;
}

.saved-names-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.saved-names-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.saved-name-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.saved-name-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
}

.saved-name-item.current {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.saved-name-item.current:hover {
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Definition section responsive */
@media (max-width: 600px) {
    .definition-section {
        padding: 20px 15px;
        margin-top: 15px;
    }
    
    .definition-title {
        font-size: 1.1rem;
    }
    
    .definition-word {
        font-size: 1.2rem;
    }
    
    .definition-text {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .name-actions {
        gap: 10px;
        margin-top: 20px;
    }
    
    .action-button {
        padding: 12px 20px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .saved-names-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .saved-names-header {
        margin-bottom: 20px;
        gap: 10px;
    }
    
    .saved-names-title {
        font-size: 1.2rem;
    }
    
    .saved-names-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        max-height: 180px;
    }
    
    .saved-name-item {
        padding: 14px 16px;
        min-height: 50px;
        font-size: 0.9rem;
    }
}
