:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #fbc63e;
    --success: #4caf50;
    --danger: #f44336;
    --text: #2d3748;
    --light: #f7fafc;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

.eng-widget {
    max-width: 900px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.eng-container {
    background: #fac53e;
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.eng-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: eng-pulse 6s ease-in-out infinite;
}

@keyframes eng-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.5; }
}

.eng-header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 30px;
}

.eng-title {
    color: white;
    font-size: 2.8em;
    font-weight: 800;
    margin: 0;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
}

.eng-gender-filter {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.eng-gender-btn {
    padding: 12px 28px;
    background: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.eng-gender-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.eng-gender-btn.active {
    background: white !important;
    color: var(--primary);
    border-color: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.eng-names-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    min-height: 380px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.eng-loading, .eng-empty {
    text-align: center;
    padding: 80px 40px;
    color: #999;
    font-size: 1.2em;
    font-weight: 500;
}

.eng-names-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.eng-name-item {
    padding: 10px 0px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    animation: eng-slide-in 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes eng-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eng-name-item:nth-child(1) { animation-delay: 0s; }
.eng-name-item:nth-child(2) { animation-delay: 0.1s; }
.eng-name-item:nth-child(3) { animation-delay: 0.2s; }
.eng-name-item:nth-child(4) { animation-delay: 0.3s; }
.eng-name-item:nth-child(5) { animation-delay: 0.4s; }

.eng-name-item:hover {
    transform: translateX(8px) scale(1.02);
}

.eng-name-text {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}

.eng-name-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.eng-copy-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #ffb347 100%);
    color: #000;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(251, 198, 62, 0.3);
}

.eng-copy-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 198, 62, 0.4);
}

.eng-copy-btn.copied {
    background: linear-gradient(135deg, var(--success) 0%, #45b649 100%);
    color: white;
}

.eng-copy-icon {
    font-size: 1.2em;
}

.eng-btn-group {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.eng-generate-btn, .eng-reset-btn {
    flex: 1;
    min-width: 200px;
    padding: 16px 32px;
    border: none;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.eng-generate-btn {
    background: white !important;
    color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.eng-generate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.eng-generate-btn:hover::before {
    width: 300px;
    height: 300px;
}

.eng-generate-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.eng-generate-btn:active {
    transform: translateY(-2px);
}

.eng-generate-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.eng-reset-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.eng-reset-btn:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

/* Loading spinner */
.eng-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: eng-spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes eng-spin {
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .eng-widget {
        margin: 20px auto;
        padding: 10px;
    }
    
    .eng-container {
        padding: 30px 20px;
    }
    
    .eng-title {
        font-size: 2em;
    }
    
    .eng-names-container {
        padding: 25px;
        min-height: auto;
    }
    
    .eng-name-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .eng-name-text {
        font-size: 1.2em;
    }
    
    .eng-name-actions {
        width: 100%;
        justify-content: center;
    }
    
    .eng-copy-btn {
        flex: 1;
    }
    
    .eng-generate-btn, .eng-reset-btn {
        min-width: 150px;
        padding: 14px 20px;
        font-size: 1em;
    }
    
    .eng-gender-filter {
        gap: 8px;
    }
    
    .eng-gender-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .eng-title {
        font-size: 1.6em;
    }
    
    .eng-container {
        padding: 25px 15px;
    }
    
    .eng-names-container {
        padding: 20px;
    }
    
    .eng-name-item {
        padding: 16px 15px;
    }
    
    .eng-name-text {
        font-size: 1.05em;
    }
    
    .eng-btn-group {
        flex-direction: column;
    }
    
    .eng-generate-btn, .eng-reset-btn {
        width: 100%;
    }
}

/* Performance optimizations */
.eng-names-container {
    will-change: contents;
}

.eng-name-item {
    will-change: transform;
}