* {
    box-sizing: border-box;
}

.ewa-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ewa-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #4a90e2 100%);
    border-radius: 24px;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.ewa-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.ewa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.ewa-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.ewa-title {
    color: white;
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.ewa-subtitle {
    font-size: 18px;
    margin: 0;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.ewa-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eef5;
}

.ewa-section {
    margin-bottom: 32px;
}

.ewa-label {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.label-text {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.label-hint {
    font-size: 14px;
    color: #718096;
}

.ewa-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
    color: #2d3748;
    background: #f8fafc;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
}

.ewa-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ewa-textarea-main {
    background: white;
    border-color: #cbd5e0;
}

.ewa-textarea-main:focus {
    border-color: #667eea;
}

.ewa-tone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.ewa-tone-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ewa-tone-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.ewa-tone-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #4a90e2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tone-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.tone-name {
    font-size: 14px;
    font-weight: 600;
}

.ewa-generate-btn {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #667eea 0%, #4a90e2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    font-family: inherit;
}

.ewa-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
}

.ewa-generate-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 24px;
}

.ewa-result-container {
    margin-top: 40px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ewa-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ewa-result-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.ewa-copy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ewa-copy-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ewa-copy-btn.copied {
    background: #48bb78;
    border-color: #48bb78;
    color: white;
}

.ewa-result {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    font-size: 15px;
    line-height: 1.8;
    color: #2d3748;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .ewa-container {
        padding: 12px;
        margin: 20px auto;
    }
    
    .ewa-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .ewa-title {
        font-size: 32px;
    }
    
    .ewa-subtitle {
        font-size: 16px;
    }
    
    .ewa-content {
        padding: 24px;
    }
    
    .ewa-tone-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ewa-result-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .ewa-copy-btn {
        width: 100%;
        justify-content: center;
    }
}